These are the steps I followed for setting up a new user on gitolite hosted on amazon aws: 1. Installed gitolite (works - I can can connect as admin & add new repos/users)
I added a test repo and a new user in the conf file in gitolite-admin.
The new user created a new ssh key called newUser - the newUser.pub was added to keydir inside gitolite-admin
The new users can connect via ssh to the Amazon AWS instance using the certificate meant for the Amazon instance
I ran the following:
git add -A git commit -m 'adding new repo and user' git push origin master
The response mentioned that the new users and repos have been generated. However, when the user connects, the ssh fails to authenticate. I ran the ssh -vvv for the git instance i.e. ssh -vvv git@server name (where server name is the amazon instance). I can see that the ssh attempt is not picking the new public key but instead trying to use the older id_rsa.pub file. I will now try to force ssh to use the new key - any other suggestions to help troubleshoot this will be greatly appreciated!
Edit: Thanks @VonC for responding. I have copied the authorized key info for the user below below:
command="/usr/share/gitolite/gl-auth-command adavid",no-port-forwarding,no-X11-forwarding,no-agent-forwarding,no-pty ssh-rsa keyinfo email@example.com
where adavid is the user added, abcdavid is the userID on the user's computer & 192.168.1.3 is the local address for the user's computer.
I had the user add a config file as well:
Host test.git.com HostName amazon host name User adavid (where adavid is the user name) PreferredAuthentications publickey IdentityFile ~./ssh/adavid (where adavid is the user name and associated with the key called adavid)
I received the following error when cloning into the git repo:
Cloning into git repository name tilde_expand_filename: No such user . fatal: The remote end hung up unexpectedly
I am checking the git command now to see if I made any mistake. thanks
keyinfois the long public ssh key? (in one line). If so, it is good. The issue should be on the client side, and an ssh will try to use
id_rsa.pub, unless you are using a
~/.ssh/configfile, as described in stackoverflow.com/questions/2931167/git-over-port-443/…, in which case you can reference any file you want.
git clone? With your
configfile, it should be:
git clone test.git.com:arepo.