I uploaded my public key to my account, when I do push/pull, git still ask for my password.

How to debug?

Comments

eliza411’s picture

Try editing your user page and saving it. It may take one or two tries, but this forces a cache clear server-side.

mattyoung’s picture

Edit and save my profile page a couple of times, still ask for password, same after waiting for over an hour :(

laura s’s picture

I am encountering the same thing trying to get the repo to see my laptop. Is there a delay before the saved key applies to the repos?

cafuego’s picture

Same here. My laptop key works fine, but my desktop key hasn't worked for about a month now, despite me having removed and re-added it a few times since then.

sdboyer’s picture

Looking into this. Seems like there's something other than the normal cache issues happening, as I am seeing the following in the logs for cafuego:

2011-06-15 23:26:13+0000 [SSHChannel session (0) on SSHService ssh-connection on SSHServerTransport,107870,174.52.174.149] remote close
2011-06-15 23:26:13+0000 [SSHServerTransport,107870,174.52.174.149] connection lost
2011-06-15 23:26:37+0000 [SSHService ssh-userauth on SSHServerTransport,107869,150.101.221.106] cafuego trying auth publickey
2011-06-15 23:26:37+0000 [SSHService ssh-userauth on SSHServerTransport,107869,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=46da2fd817a8f458b66d16d16772a06c>
2011-06-15 23:26:37+0000 [HTTPPageGetter,client] cafuego authenticated with publickey
2011-06-15 23:26:37+0000 [HTTPPageGetter,client] starting service ssh-connection
2011-06-15 23:26:37+0000 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=46da2fd817a8f458b66d16d16772a06c>
2011-06-15 23:26:37+0000 [SSHService ssh-connection on SSHServerTransport,107869,150.101.221.106] got channel session request
2011-06-15 23:26:37+0000 [SSHChannel session (0) on SSHService ssh-connection on SSHServerTransport,107869,150.101.221.106] channel open
2011-06-15 23:26:38+0000 [SSHChannel session (0) on SSHService ssh-connection on SSHServerTransport,107869,150.101.221.106] unhandled request for env
2011-06-15 23:26:38+0000 [SSHChannel session (0) on SSHService ssh-connection on SSHServerTransport,107869,150.101.221.106] executing command "git-receive-pack 'project/media_schooltube.git'"
2011-06-15 23:26:38+0000 [SSHChannel session (0) on SSHService ssh-connection on SSHServerTransport,107869,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/vcs-auth-data?project_uri=media_schooltube>
--
2011-06-15 23:30:11+0000 [SSHServerTransport,107871,150.101.221.106] kex alg, key alg: diffie-hellman-group1-sha1 ssh-rsa
2011-06-15 23:30:11+0000 [SSHServerTransport,107871,150.101.221.106] outgoing: aes128-ctr hmac-md5 none
2011-06-15 23:30:11+0000 [SSHServerTransport,107871,150.101.221.106] incoming: aes128-ctr hmac-md5 none
2011-06-15 23:30:12+0000 [SSHServerTransport,107871,150.101.221.106] NEW KEYS
2011-06-15 23:30:12+0000 [SSHServerTransport,107871,150.101.221.106] starting service ssh-userauth
2011-06-15 23:30:12+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] cafuego trying auth none
2011-06-15 23:30:12+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] cafuego trying auth publickey
2011-06-15 23:30:12+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=173efa3649677e9a729f615d6bfc446a>
2011-06-15 23:30:12+0000 [HTTPPageGetter,client] cafuego failed auth publickey
2011-06-15 23:30:12+0000 [HTTPPageGetter,client] unauthorized login: cafuego
2011-06-15 23:30:12+0000 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=173efa3649677e9a729f615d6bfc446a>
2011-06-15 23:30:13+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] cafuego trying auth publickey
2011-06-15 23:30:13+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=6fb06137cefbf29801cb90b39b1be500>
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] cafuego failed auth publickey
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] unauthorized login: cafuego
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=6fb06137cefbf29801cb90b39b1be500>
2011-06-15 23:30:13+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] cafuego trying auth publickey
2011-06-15 23:30:13+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=d83f2be37450b30ee0a96a95d2405339>
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] cafuego failed auth publickey
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] unauthorized login: cafuego
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=d83f2be37450b30ee0a96a95d2405339>
2011-06-15 23:30:13+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] cafuego trying auth publickey
2011-06-15 23:30:13+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=dba5658e6ac49608229f265cfaf0b739>
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] cafuego failed auth publickey
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] unauthorized login: cafuego
2011-06-15 23:30:13+0000 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-ssh-user-key?username=cafuego&fingerprint=dba5658e6ac49608229f265cfaf0b739>
2011-06-15 23:30:15+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] cafuego trying auth password
2011-06-15 23:30:15+0000 [SSHService ssh-userauth on SSHServerTransport,107871,150.101.221.106] Starting factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-vcs-auth-check-user-pass?username=cafuego&password=d41d8cd98f00b204e9800998ecf8427e>
2011-06-15 23:30:15+0000 [HTTPPageGetter,client] Stopping factory <HTTPClientFactory: http://localhost:8888/drupalorg/drupalorg-vcs-auth-check-user-pass?username=cafuego&password=d41d8cd98f00b204e9800998ecf8427e>
2011-06-15 23:30:16+0000 [-] cafuego failed auth password
2011-06-15 23:30:16+0000 [-] unauthorized login: cafuego

So we see successful logins on 46da2fd817a8f458b66d16d16772a06c, but failed logins on 173efa3649677e9a729f615d6bfc446a. Probably a serverside cache issue on just that key. What's odd is that it *should* clear along with the other one, but...yeah. I'll have to look.

mattyoung’s picture

I got this:


ssh -v git@git.drupal.org
OpenSSH_5.2p1, OpenSSL 0.9.8l 5 Nov 2009
debug1: Reading configuration data /etc/ssh_config
debug1: Connecting to git.drupal.org [140.211.10.6] port 22.
debug1: Connection established.
debug1: identity file /Users/matthewyoung/.ssh/identity type -1
debug1: identity file /Users/matthewyoung/.ssh/id_rsa type 1
debug1: identity file /Users/matthewyoung/.ssh/id_dsa type -1
debug1: Remote protocol version 2.0, remote software version Twisted
debug1: no match: Twisted
debug1: Enabling compatibility mode for protocol 2.0
debug1: Local version string SSH-2.0-OpenSSH_5.2
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: sending SSH2_MSG_KEXDH_INIT
debug1: expecting SSH2_MSG_KEXDH_REPLY
debug1: Host 'git.drupal.org' is known and matches the RSA host key.
debug1: Found key in /Users/matthewyoung/.ssh/known_hosts:3
debug1: ssh_rsa_verify: signature correct
debug1: SSH2_MSG_NEWKEYS sent
debug1: expecting SSH2_MSG_NEWKEYS
debug1: SSH2_MSG_NEWKEYS received
debug1: SSH2_MSG_SERVICE_REQUEST sent
debug1: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey,password
debug1: Next authentication method: publickey
debug1: Offering public key: /Users/matthewyoung/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey).                   <========== works here?
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
PTY allocation request failed on channel 0
shell request failed on channel 0
cafuego’s picture

On the machine with the non-working key, git@git.drupal.org does indeed work fine:

ssh -v git@git.drupal.org
OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
...
debug1: Offering public key: /home/cafuego/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 277
debug1: Authentication succeeded (publickey)

However, cafuego@git.drupal.org does not:

ssh -v cafuego@git.drupal.org
OpenSSH_5.3p1 Debian-3ubuntu6, OpenSSL 0.9.8k 25 Mar 2009
...
debug1: Offering public key: /home/cafuego/.ssh/id_rsa
debug1: Authentications that can continue: publickey,password
[2 retries]
debug1: Next authentication method: password
cafuego@git.drupal.org's password: 

On the other machine, both work fine.

So the backend must decide one of the public keys it has on file somehow doesn't match the private key on my end, or it can't find a matching public key at all. I've deleted and re-added that public key twice.

It's also not a matter of it being an invalid key pair, as it works absolutely fine between my workstation and servers locally.

I've renamed the ~/.ssh/config file, so that can't be interfering and/etc/ssh/ssh_config on both systems at my end is identical.

When I copy the private key from the working laptop to the non-working desktop and configure SSH to use that, it authenticates fine.

batje’s picture

subscribe

sdboyer’s picture

Status: Active » Fixed

We cleared out Varnish today, so everybody who has been having problems should, in theory, be all set now. We also made it so the timeout is just a day, so problems should self-correct in 24 hours.

mattyoung’s picture

Thanks! It's working for me now.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

sibiru’s picture

Issue summary: View changes

I got this issue when git push my commit, wait 24 hours still asking passphrase & drupal.org password.