user unable to connect to git (using gitolite on ubuntu)
This address won't ever work: git clone username@IPAddress:newRepoName.git
When using gitolite, you always use the same account:
git clone git@IPAddress:newRepoName.git
(if git is the account under which gitolite is installed)
See "adding and removing users" to understand how to declare a new user:
Ie adding his/her public key named after the user id in the gitolite.conf
file.
Then the user must have his/her keys in ~/.ssh/id_rsa(.pub)
, and make any git command with git@IPAddress:newRepoName.git
(git
, not username
)
The issue was with the client setup for connecting to the amazon aws instance hosting git. I have accepted VonC's response since he was very responsive to all my questions.Thanks
- I had the user connect via ssh (using the ssh certificate file) - the user accepted the key for the connection to their computer.
-
The user added a config file into their ~./ssh file in the following format:
Host test.git.com
HostName amazonHostName
User adavid
PreferredAuthentications publickey
IdentityFile ~./ssh/adavid
The user ran the ssh-add command as well. However, they were not able to connect to the git repository using the short name and had to use the long name for the connection.
Once again - Merci beaucoup VonC!
For others having the same problem, check whether AllowGroups is in use for ssh on the server. Might be the git-user on the server isn't in the correct group.
Diagnosis: attempt to ssh to the git-user on the server, and see what turns up in /var/log/auth.log If it says "User git from not allowed because none of user's groups are listed in AllowGroups", you need to check which groups are in AllowGroups and then add the git user to one of those.