I have the problem where `git fetch` takes an enormous time to complete - always 13 minutes, and 9 seconds ± a few ms -, which does not happen on other git origins like e.g. Github repos - to eliminate issues caused by network. The consistent time taken to complete the operation makes me assume the establishing of the connection takes slightly over 13 minutes and the actual response is what makes the variation in completion time, but I have no idea what causes this.
This problem occured a few days ago, before fetch worked as usual, but there has been no significant event that would explain why this change in speed occured.
I work with SSH, I have not tried using HTTPS yet because I work with SSH on all repos I contribute to.
I suggest to start by changing your SSH debug level to more verbose. Depending on your git client version, you can use one of the following:
1. From Git version 2.3.0, you can use the environment variable
GIT_SSH_COMMAND and pass the
-v verbose argument:
GIT_SSH_COMMAND="ssh -v" git clone example
2. From Git version 2.10.0, you can save this configuration globally, or per repo:
git config core.sshCommand "ssh -vvv" git pull
See original answer here
Thanks, I was unaware you could do that!
That pointed me into the right direction, which leads me to the problem of my network refusing connection to bitbucket's IPv6 addresses, documented here: https://confluence.atlassian.com/bbkb/recent-ipv6-changes-840796883.html
I have solved the issue with the mentioned workaround, thanks a lot!