tags:

views:

70

answers:

2

I followed this guide to setup git and gitosos: http://scie.nti.st/2007/11/14/hosting-git-repositories-the-easy-and-secure-way. I'm stuck at this part: git clone git@YOUR_SERVER_HOSTNAME:gitosis-admin.git

I'm using Git Extensions with putty and my SSH server is running on a non-standard port. It says how to set the port for linux but not for windows with Git Extensions. Since Git Extensions is using putty, I tried making a profile called 'git' with the IP, port, username (git) and the SSH key I added set. When I connect with that profile with putty, it says Server refused our key.

There are several places where I'm not sure if I've done this right. I've read some guides saying that the username for gitosis should be 'gitosis', not 'git'. Does it matter that I created the user as 'git' as specified in the guide? Is 'git' the auto-login username I should set in the putty profile?

Also, I used the SSH key I always use and have generated previously with Putty keygen. In the comment, the name is set to "telanor". Is this of any significance, meaning, does it matter that it is different from the auto-login username I set in the putty profile?

And the last part I'm unsure of. Is this the correct syntax for Git Extensions when cloning a repository using the putty profile: git://git/gitosis-admin.git? When I try that, the response is: fatal: Unable to look up git (port 9418) (No such host is known. ) I have no idea where it is getting that port number from, it's not the one I set in the putty profile

Edit:

Thanks to Henk I figured out the the URL should most likely be ssh://git/gitosis-admin.git. But I have 2 more questions now. Is my assumption that I can use putty profiles correct? Also, the tutorial says to check out the gitosis-admin.git from your client. I assumed this means "some other computer which is not the one you just set gitosis up on". Or am I supposed to check it out on the same computer and set up the users before external access is allowed?

A: 

I think the correct syntax int Git Extensions should be: git://git/gitosis-admin.git:[port].

At least that is what the git manual sais: http://www.kernel.org/pub/software/scm/git/docs/git-clone.html

Henk
I don't see any URL syntax that puts the port at the end, but the link did help. It seems the tutorial is using the alternative SSH syntax, so I suppose the correct syntax for me would be `ssh://git/gitosis-admin.git` It's still not connecting though
Telanor
Did you try ssh://git[:port]/gitosis-admin.git?edit: just ignore my comment, I just noticed you already found the problem.
Henk
A: 

I found out the problem. I found a comment on another setup guide that said: "If the git clone command asks you for a password be sure to sudo tail -f /var/log/auth.log on your remote server and if it complains about the git user not being in AllowUsers, remove the AllowUsers from your /etc/ssh/sshd_config or add the git user to AllowUsers."

Adding git to the AllowedUsers fixed it

Telanor
put this in your question instead
Thorbjørn Ravn Andersen