我刚刚安装了 ubuntu 16.10。
我使用 gpg-agent 进行 ssh 身份验证。它运行良好,我可以使用 ssh 而没有任何问题。
但是当我使用 git 时,git 不会联系 ssh-agent(实际上是 gpg-agent)。它在 16.04 下可以工作,但在 16.10 下不行
printenv | grep SSH
SSH_AUTH_SOCK=/run/user/1000/keyring/ssh
git pull
debug1: Authentications that can continue: publickey
debug3: start over, passed a different list publickey
debug3: preferred gssapi-keyex,gssapi-with-mic,publickey,keyboard-interactive,password
debug3: authmethod_lookup publickey
debug3: remaining preferred: keyboard-interactive,password
debug3: authmethod_is_enabled publickey
debug1: Next authentication method: publickey
debug1: Offering RSA public key: /home/dmg/.ssh/id_rsa
debug3: send_pubkey_test
debug3: send packet: type 50
debug2: we sent a publickey packet, wait for reply
debug3: receive packet: type 51
debug1: Authentications that can continue: publickey
debug1: Trying private key: /home/dmg/.ssh/id_ecdsa
debug3: no such identity: /home/dmg/.ssh/id_ecdsa: No such file or directory
debug1: Trying private key: /home/dmg/.ssh/id_ed25519
debug3: no such identity: /home/dmg/.ssh/id_ed25519: No such file or directory
debug2: we did not send a packet, disable method
debug1: No more authentication methods to try.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
正如我已经提到的,直接运行 ssh 时 ssh 身份验证有效,但运行 git 时无效。
谢谢您的任何提示/帮助。