2

I recently installed git on my Windows 10 PC. Everything works well however when I push or pull anything it can take up to several minutes to complete. Changing wireless networks doesn't seems to change anything, the issue persists on both private and public repos, and have never experienced it take this long before. Additionally I have tried uninstalling and reinstalling Git. To troubleshoot I ran:
GIT_CURL_VERBOSE=1 GIT_TRACE=1 git pull origin master

And saw that it was hanging and spending lots of time here:

* Couldn't find host github.com in the _netrc file; using defaults
*   Trying 192.30.253.113...
* TCP_NODELAY set

* After 149984ms connect time, move on!
* connect to 192.30.253.113 port 443 failed: Timed out
*   Trying 192.30.253.112...
* TCP_NODELAY set
* Connected to github.com (192.30.253.112) port 443 (#0)

This timeout occurs on every git pull or git push that I try, and do not know how to troubleshoot further.

1 Answers1

0

First, check if the issue persists when using SSH instead of an HTTPS URL.

Second, check also if other programs might interfere, by using a simplified PATH and a portable Git (like PortableGit-2.20.1-64-bit.7z.exe) uncompressed anywhere you want.

set PATH=C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\
set GH=C:\path\to\git
set PATH=%GH%\bin;%GH%\usr\bin;%GH%\mingw64\bin;%PATH%
VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250