Posts Tagged ‘git gitorious’

Dear Lazyweb: Why don’t public ssh repository sites like me?

Wednesday, September 24th, 2008

So, a couple months back, I tried to setup a git repository on repo.or.cz. No dice; it didn’t seem to like my ssh key and I was never able to push. Never got a response to my email either.

I figured I’d try again with gitorious.org. So I go over there and create an account, upload my public ssh key, create a project, try to push…and am prompted for a password (yes I remembered to run ssh-add first). While I’m no ssh expert, I have used ssh keys before to connect between systems without having to enter a password for each connection, so I’m a bit perplexed at what’s wrong.

Since gitorious.org allows me to remove or add additional keys myself (unlike repo.or.cz), I tried playing around with adding others (and selectively adding or removing keys from my ssh keyagent with ssh-add). Here’s what I’m doing:

$ ssh-keygen -t dsa -f gitorious -C "newren@gitorious.org"
$ cp gitorious* ~/.ssh
$ ssh-add ~/.ssh/gitorious
<Enter appropriate password>
<Copy & paste contents of ~/.ssh/gitorious.pub into the add ssh key thing at the gitorious.org site>
<Periodically reload http://gitorious.org/account until my new public ssh key is shown>
$ git push newren@gitorious.org:eg/mainline.git
newren@gitorious.org's password:
<Hit Ctrl-C>
$ ssh -v newren@gitorious.org echo hi
<I snipped a lot of output here>
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /home/newren/.ssh/gitorious
debug1: Authentications that can continue: publickey,password
debug1: Trying private key: /home/newren/.ssh/id_rsa
debug1: Trying private key: /home/newren/.ssh/id_dsa
debug1: Next authentication method: password
newren@gitorious.org's password:
<Hit Ctrl-C>

I know lots of other people are using these sites without problems. Which step or steps am I doing wrong?

UPDATE: Many thanks for the different suggestions. Adam G spotted the problem; my push command should have been
$ git push git@gitorious.org:eg/mainline.git
instead of
$ git push newren@gitorious.org:eg/mainline.git
I suspect my problem with repo.or.cz was the same thing.