I followed this description setting up a git remote git repo. This worked pretty well so far, but only when I use
email@example.com:/gituserhomedir/someproject.git. When I switch to user
git@... like the manual suggests I am facing a password prompt again.
I have also found this post containing lots of advice concerning chmod etc, but still can't get it to go. The strange thing to me is that I face password with the git user and a working thing as root. Any idea what's going wrong? I would really like to user a git user only dedicated to do git things (also that git shell is neat).
EDIT: Here's a rough outline of what I've done so far:
# remote machine, being root adduser git su git cd mkdir .ssh # on local machine cat mykey_rsa.pub | pbcopy # on remote (as user git), pasted clipboard to file.. vim ~/authorized_keys
I have done the same thing with the root user, adding a pubkey to the roots .ssh folder. This does work, it's only that for other users than root (with other homedirs) such as @git I cannot get a connection. I also checked the sshd_config and set the corresponding coefficients to yes.
EDIT2: Upon request, here's the output of ssh -v:
OpenSSH_5.6p1, OpenSSL 0.9.8x 10 May 2012 debug1: Reading configuration data /Users/hans0l0/.ssh/config debug1: Reading configuration data /etc/ssh_config debug1: Applying options for * debug1: Connecting to myserver.com [xx.yy.zz.202] port 22. debug1: Connection established. debug1: identity file /Users/hans0l0/.ssh/hans_rsa.pub type 1 debug1: identity file /Users/hans0l0/.ssh/hans_rsa.pub-cert type -1 debug1: Remote protocol version 2.0, remote software version OpenSSH_5.3 debug1: match: OpenSSH_5.3 pat OpenSSH* debug1: Enabling compatibility mode for protocol 2.0 debug1: Local version string SSH-2.0-OpenSSH_5.6 debug1: SSH2_MSG_KEXINIT sent debug1: SSH2_MSG_KEXINIT received debug1: kex: server->client aes128-ctr hmac-md5 none debug1: kex: client->server aes128-ctr hmac-md5 none debug1: SSH2_MSG_KEX_DH_GEX_REQUEST(1024<1024<8192) sent debug1: expecting SSH2_MSG_KEX_DH_GEX_GROUP debug1: SSH2_MSG_KEX_DH_GEX_INIT sent debug1: expecting SSH2_MSG_KEX_DH_GEX_REPLY debug1: Host 'myserver.com' is known and matches the RSA host key. debug1: Found key in /Users/hans0l0/.ssh/known_hosts:4 debug1: ssh_rsa_verify: signature correct debug1: SSH2_MSG_NEWKEYS sent debug1: expecting SSH2_MSG_NEWKEYS debug1: SSH2_MSG_NEWKEYS received debug1: Roaming not allowed by server debug1: SSH2_MSG_SERVICE_REQUEST sent debug1: SSH2_MSG_SERVICE_ACCEPT received debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with- mic,password debug1: Next authentication method: publickey debug1: Offering RSA public key: /Users/hans0l0/.ssh/hans_rsa.pub debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Offering RSA public key: /Users/hans0l0/.ssh/id_rsa debug1: Authentications that can continue: publickey,gssapi-keyex,gssapi-with-mic,password debug1: Next authentication method: password