Git push works for gitosis but not my own repo (Permission denied)
- by Mickey Cheong
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