Git has a long delay between git pull and asking for password
Asked Answered
T

1

8

I'm on Ubuntu 13.10 and git recently started acting strange. Whenever I do a pull or a push, there is about a 20 second delay between running the command and it asking for my password.

My remote url looks like [email protected]:/project/directory/

The problem only recently started happening. I'm not using the default git user, but a user I created on the server and added to the git group.

The repo isn't that large, and since the delay is between running the command and asking for password i'm assuming its a network issue. The server is on my work LAN so connection speed shouldn't be an issue.

Any suggestions?

Edit: Here's a screenshot. The 20s delay is between the "git pull" and "Enter Password" git pull --verbose

FIXED As per the accepted answer, it was GSSAPIAuthentication. I simply created a ~/.ssh/config file and added:

Host *
    GSSAPIAuthentication no
Thebault answered 7/2, 2014 at 17:28 Comment(2)
Can you post the output of running one of the above commands with the --verbose flag? Doing so will probably give you a feel for where it is taking so long.Vacancy
Is git accessing the server via SSH? Check that you can login to the server using ssh without a delay. If there's a long delay, check that the server is able to successfully do a reverse-DNS lookup of your (client) IP.Gooseflesh
V
5

Based on your edit it sounds like the hang up is when you make the connection over SSH. If you SSH'd into the server you probably will see a similar delay.

In my experience this is usually a result of having GSSAPIAuthentication enabled, which unfortunately is enabled by default on new installations of SSH.

The most straightforward debugging and client/server fix instructions I've found are over at Coderwall.

You can disable GSSAPIAuthentication on the client or the server. I would recommend doing so on the server side, so other clients won't have this problem.

Vacancy answered 7/2, 2014 at 21:2 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.