I encountered a rather strange experience when trying to fetch on my VM that runs ubuntu (host Windows 10). I needed to get the changes from the repo onto my computer, so I used git fetch, except it hanged on the terminal.
So basically I had this ($ is from the terminal, not part of the command):
$ git fetch
cursor stuck here
Then I tried this (I was hoping it might be stronger than fetch):
$ git fetch --all
cursor stuck here
I ran an strace on the fetch call, and this is something I do not quite understand what happened, but it basically stopped on a line like this:
read(5,
I noticed that some ssh directories did not exist (had some -1 ENOENT errors from the strace), so I tested my ssh commands, and they also hanged. Or at least I thought.
For one of my aliases, it really did seem to hang. However, when I copy/pasted that alias into the terminal it ended up working (just really slowly). Then, I tested my ssh aliases and they started working fine too. Strange...
At this point I tried git fetch
again and it worked!!!
However, I have no idea what happened, does anyone have any idea? Is this an issue worth investigating?
Edit:
After completing one fetch call, I could no longer fetch. SSH is now inconsistent. Git pull hangs.
strace on git pull ends with a
wait4(4439,
Additionally, there seem to be a lot of -1 ENOENT errors complaining about various .git directories.
Is this just a speed thing for ssh and for the git commands something more serious?
EDIT2:
So I tried what was suggested in the comments (setting GIT_TRACE to 2, suing export since I am in ubuntu). It showed what was going on with each git call under the hood, and for some reason git pull/git fetch freeze about halfway through. About 20 minutes later they unfreeze and work again.
I am probably going to leave my computer and restart the vm and look at it tomorrow (long day). Does anyone have any suggestions for speeding this up/why this might be happening?