0

I am unable to execute git pull or git clone from the terminal or the terminal inside VSCode. I just get no feedback. I have repeatedly tried to change WIFI, restart laptop, restart VSCode, regenerate SSH Keys, without success. Also executed git gc --prune=now --aggressive, which did not help. Do you know what might be the issue and what else I could try?

enter image description here

Update

enter image description here

unset SSH_AUTH_SOCK did not help either, nor did turning off the firewall

gusti
  • 393
  • 4
  • 21
  • Maybe this question can help to you: https://stackoverflow.com/questions/44031150/why-does-git-pull-hang – Jino Michel Aque Sep 12 '22 at 14:35
  • @JinoMichelAque I've updated the question based on what I tried from the link you've sent. – gusti Sep 12 '22 at 14:44
  • Maybe this will help see what's going on? [Really verbose way to test Git connection over SSH?](https://askubuntu.com/q/336907) – joanis Sep 12 '22 at 14:50
  • Tracing a little bit might help you see what is going on: https://stackoverflow.com/a/38706495/2437508 – eftshift0 Sep 12 '22 at 15:12
  • First: always prune away irrelevant stuff when testing, so that you don't test things you don't care about. The part that's hanging is presumably `git fetch`, so use `git fetch` rather than `git pull`: `git pull` runs *two* commands and you want to debug just *one*, not three total (pull plus the inner two). Second, check the URL that `git fetch` is fetching from, with `git remote -v`. If it's using https, try connecting from a browser or from the "curl" command. If it's ssh, try connecting from ssh. In other words, remove *Git* from the testing entirely! – torek Sep 12 '22 at 22:20
  • If and when you've established that ssh or curl or whatever is able to contact the remote host (assuming there is a remote host), *then* introduce ssh and/or curl packet tracing as appropriate. If the problem is that you can't reach out over the net, focus in on that. – torek Sep 12 '22 at 22:21
  • Who knows, it may turn out to be a new variant of the [500 mile email bug](https://web.mit.edu/jemorris/humor/500-miles). – torek Sep 12 '22 at 22:23

1 Answers1

0

Seems like the latest Mac update to Monterey 12.15.1 broke the connection to github, so what I did to fix it in the end was to delete the Cisco AnyConnect Socket Filter app from my Mac, regenerate keys using ssh-keygen -t ed25516 -C "your_email@example.com" -f $HOME/.ssh/id_ed25516 command, then place the ~/.ssh/id_ed25516 file contents in a new SSH Key on my github account. After these changes, the git pull commands started working again.

gusti
  • 393
  • 4
  • 21
  • 1
    I can confirm this, my git installation broke totally during the night. Had to update to Monterey 12.6, update Xcode and git to make it work again. – Jimmy Hedström Sep 13 '22 at 13:04