Until yesterday, git
worked perfectly on my computer. Now, whenever I try to push, pull or clone a repository, git hangs. I've tried through both SSH and HTTPS.
Unlike a lot of other StackOverflow questions posted around this issue, my operation hangs on the same early stage.
For example, running GIT_TRACE=1 GIT_CURL_VERBOSE=1 git push origin master
gives the following trace:
09:09:45.400105 git.c:418 trace: built-in: git push origin master
09:09:45.892978 run-command.c:643 trace: run_command: GIT_DIR=.git git-remote-https origin https://github.com/SOBotics/Botpy.git
* Couldn't find host github.com in the .netrc file; using defaults
* Trying 192.30.253.112...
* TCP_NODELAY set
Without setting the debug environment variables, no messages are shown. However, when I'm cloning a repository, it shows Cloning into <name>...
, and then gets stuck at the same stage in the above traceback.
Here's what I've already tried:
- Reinstalling
git
through Homebrew. - Rebooting my computer a couple of times.
- Disabling Pi-hole (I've been running Pi-hole since multiple months, and I never faced such an issue).
git config --global core.askpass "git-gui--askpass"
: from an answer in a similar thread. This had no affect.xcode-select --reset
- Checking whether the IP in the trace is the same as in
host github.com
; it is the same. - Tried cloning different repositories, through both HTTPS and SSH.
I'd also like to note that Homebrew updates also get stuck, probably because of the same issue. Homebrew's curl upgrade also hung. Other git functions like commit
and add
seem to be working fine.
I'm on macOS Mojave, running git version 2.20.1
. The repositories I'm trying to push, pull and clone are all on GitHub.