Reputation: 3433
I've got a similar problem to this post here: gitolite push error -> remote: ENV GL_RC not set
I've installed gitolite successfully as a non-root method with no warnings or errors. Hoever I can't push since I get ENV GL_RC not set errors. (If I try to manually assign that in my ENV I get a load of trouble.)
I can clone if I use:
git clone git@server:repositories/gitolite-admin
The solution from the link above is to use the following which I can not do. I can't clone if I use:
git clone git@server:gitolite-admin
That renders a error of:
Cloning into gitolite-admin...
fatal: 'gitolite-admin' does not appear to be a git repository
fatal: The remote end hung up unexpectedly
I can't do a package install since I'm on Ubuntu 10.04 LTS which doesn't have it in its repository list.
I've looked through the documentation from http://sitaramc.github.com/ however I can't seem to get it. Any ideas how I can resolve this?
Upvotes: 1
Views: 3468
Reputation: 1327034
I confirm that:
a/ git clone git@server:repositories/gitolite-admin
will bypass gitolite, which triggers the ENV GL_RC not set
error.
b/ git clone git@server:gitolite-admin
is the right syntax, and usually fails for ssh reason:
In particular, note the
command=
option, which means "regardless of what the incoming user is asking to do, forcibly run this command instead".Without this
command=
option, the ssh daemon will simply give you a shell, which is not what we want for our gitolite keys (although we may well have other keys which we use to get a shell).This is the backbone of what makes gitolite work; please make sure you understand this.
If you look in the
authorized_keys
file, you'll see entries like this (I chopped off the ends of course; they're pretty long lines):
command="[path]/gl-auth-command sitaram",[more options] ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEA18S2t...
command="[path]/gl-auth-command usertwo",[more options] ssh-rsa AAAAB3NzaC1yc2EAAAABIwAAAQEArXtCT...
So check and make sure all your lines in ~git/.ssh/authorized_keys
are correctly prefixed with the command=
directive.
Upvotes: 2