I setup gitosis a while back and things were running fine, but eventually tragedy struck. Long story short, the machine gitosis was on got nuked, but I had a backup of all the files.
I began attempting to reinstall gitosis, I started from a fresh install of gitosis from apt, moved some files over, had to enter a command or two to get it back up to speed (which unfortunately I don't remember) which worked and gitosis was back in place.
Fast forward about 2 weeks. I go to push to git from a remote host and gitosis is asking for password. Today I try to edit the gitosis-admin repo and push that from the same host gitosis is on, and that's asking for password as well.
I've tried:
ssh-keygen -t rsa
.gitosis-init < /tmp/id_rsa.pub
as user gitosis and using the newly generated key.git clone gitosis@locahost:gitosis-admin.git
and git clone gitosis@mydomain.net:gitosis-admin.git
I've verified that the gitosis user is setup with --disable-password and all the copied old gitosis files have been chown'd to the new user.
I'm really not sure where to got from here other than just a fresh install.
Problem solved with some links from @VonC. Ended up setting up and SSH daemon on port 2222 for debug and learned that SSH was immediately refusing key authentication due to excessive permissions. Neither the .ssh directory nor home directory for the git user should have group or public write privilege, a simple chmod 700 ./
and chmod -R 700 ./.ssh
fixed it right up!