For a few months now I think, whenever I'm pushing/pulling/cloning (or i guess doing other network related GIT operations) it takes forever before anything actually seems to happen. That is, it takes around 1 minute before it starts fulfilling the task.
I'm using GIT through "Bash on Ubuntu on Windows" and if I clone using HTTPS there's no problem, however, with SSH it takes too long before it starts. I have tested both HTTPS and SSH for Bitbucket and GitHub and it only seems to be SSH for Bitbucket that is slow.
Example: cloning a repo of less than 2MB takes around 1m10s, while only in the last second the files are actually written to the disk.
I don't know if this could have anything to do with the relatively recent update to the Bitbucket IPs, but deleting my "known_hosts" in ~/.ssh didn't not help either. Is this a known issue? Common GIT tasks are becoming quite cumbersome.
Community moderators have prevented the ability to post new answers.
After breaking my head for a day, have figured out the root cause of the issue.
SSH supports both IPv4 and IPv6 and prefers IPv6 if the DNS retrieves AAAA record, but my ISP doesn't support IPv6, which results in huge delays
We can solve it in two ways
After changing ssh_config do restart ssh client, on Ubuntu the command is
"sudo service ssh restart"
This was my exact problem, perhaps Movistar Perú doesn't support IPv6 either.
Not surprised.
Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
My problem too. I had been copping 15 minute delays.
Massive thanks.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this was also my problem.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
I even had this happening on an EC2 instance I was remoting into. Thanks a ton!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
That was a relief. Thank you!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Awesome! Perfect! This has been going on for a while for me! Thanks so much!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you!!!
It was driving me crazy. Doing "git pull" in any of my repositories was taking 18 minutes... 18 MINUTES!!! to just show "Already up-to-date.".
I just moved to a new home on Feb 29th and I started noticing this in my new home. I was totally sure the problem was with the new internet configuration (a router acting as a switch behind the ISP router) and I tried a lot of configurations but nothing fixed the error. Only today, when I connected my PC with an ethernet cable directly to the ISP router and it didn't fix the error, I started thinking the problem was Bitbucket and not my home network. That made me look for a solution here.
Once I added your setting suggestion to ssh_config, it immediately worked.
Thank you, thank you, thank you.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me.
* Windows 10
* WSL
* ssh
`git pull` went from minutes to seconds.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
This worked for me too!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. Today you have saved my life. I was struggling since morning.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thank you a lot!
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Thanks. For me:
Set "AddressFamily inet" in /etc/ssh/ssh_config to force IPv4 connection
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Second option worked for me like a charm.
I am on Spain using Digi ISP.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Funcionó a la perfección, de momento a otro tenía lentitud.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Navigate to this folder C:\Users\<username>\.ssh
Create new config file if it not presented.
To create a new config file.
Open git bash from the folder and enter below command.
touch config
Once you created the file, open the file and add the below text.
AddressFamily inet
Save it and close the file.
Reload the terminal and try here. It will work
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
ty mate, this worked for me
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
this worked for me. thanks
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
thanks, on windows 11
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here (Hungary).
I get ~30KiB/s with git clone via ssh.
Both on IPv4 and IPv6.
Other git providers are about 100x faster on the same network.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
same problem here, any suggestion to that?
First time I experience something like that.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Can you describe your issue in more details? It seems to me that your issue is more about slow download speed, which seems slightly different.
Did you try the solution giridharkannan posted?
Have you checked if there's a general issue with your download speed (not just in GIT)?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Same problem here
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Casper! Are you still experiencing this issue? Did you have a chance to try a different network?
Let us know!
Ana
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hey Ana
Thanks for the suggestion. Apparently there must be something to it. At work I had no problems and turning on VPN from home also helped... question is why :/
Could it be my router or ISP that is somehow filtering that connection? Although I don't see why I would have no trouble with GitHub then...
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hmm, installing Wireshark I can see that it must be something inside bash/git itself, because no packets are captured until after a minute of silence. SSH'ing against GitHub instantly shows packets being transferred however.
Perhaps I should reinstall git or maybe even bash if there's no other way :/
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.