I have an issue with gitosis and gitolite which I have spent many hours researching to no avail. After following setup instructions closely for both products, the common symptom is that the target repository is not being located properly through gitosis/gitolite:
This fails:
$> git clone [email protected]:testing
Cloning into testing...
fatal: 'testing' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
While this works:
$> git clone [email protected]:~/repositories/testing
Cloning into testing...
warning: You appear to have cloned an empty repository.
So specifying the full path works, but this would indicate that somehow we are not running through gitosis/gitolite.
Another possibly related symptom of the problem is that when I connect to the server via ssh after the installation, my connection freezes with this message:
$> ssh [email protected]
PTY allocation request failed on channel 0
Also, when I execute "ssh [email protected] info", I keep getting the GNU info instead of gitolite's info (which I can get if I run '/usr/local/bin/gl-auth-command kreeble' as gitolite on the server). I have confirmed that in user gitolite's .ssh directory, authorized_keys has only one entry which puts me through the gitolite command:
command="/usr/local/bin/gl-auth-command kreeble",no-port-forwarding,\
no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa long_key_base64_here \
[email protected]
Any ideas on why I would not be presented with the gitolite prompt? I would appreciate any thoughts on this problem, thank you!
I know only about gitosis, which is the predecessor of gitolite and the problem must be the same. I have experienced the very same problem until I thought it out.
Without gitolite installed, normally git installs repositories in ~git, but ~gitolite installs repos in e.g. ~/gitolite/repositories/testing.git.
It is my understanding that the .git suffix is requried.
[email protected]:testing takes you to ~gitolite/repositories/testing but I guess that the code is written in such a way that it thinks that the repo must be named as testing.git. So it deems it as an error.
[email protected]:~/repositories/testing bypasses this URL rewriting rule, but my guess is that it again looks for ~gitosis/repositories/testing.git.
This time, the error handling seems to be a different code. I think that, when it does not find testing.git, it is coded to return an empty repo.
If you simply add .git suffix, all problems disappear. At least that was my experience with gitosis.
Good luck.