Git push works for gitosis but not my own repo (Permission denied)

Posted by Mickey Cheong on Stack Overflow See other posts from Stack Overflow or by Mickey Cheong
Published on 2011-02-15T23:23:49Z Indexed on 2011/02/15 23:25 UTC
Read the original article Hit count: 262

Filed under:

Hi,

I follow this exact guide to setup my GIT server: http://blog.agdunn.net/?p=277

I tried it before and it works. However, this time, when I provision a new server, it doesn't. I followed the exact steps and I provision it 3 times. It still failed.

I get this errors: Permission denied (publickey). fatal: The remote end hung up unexpectedly

However, this only happen when I try to add a remote origin and push my new repo. If I do a git push on my gitosis, it works perfectly fine.

I tried look into the IP and all the permission, I can't figure out what went wrong.

Another test I did was, I went into .ssh/known_hosts/ and delete the IP entry. When I tried to do a git push for gitosis-admin, it will prompt if I wanted to allow this IP. However, this prompt doesn't appear for my new repo.

Any help will be great appreciated.

Thanks, Mickey

© Stack Overflow or respective owner

Related posts about git