1

I use Git remote operations like pull, push, and fetch very often and usually in quick succession. However, after I started using two GitHub accounts on my computer, I noticed that these operations would often get stuck if done too close together. It is almost as if there is an operation limit of 1 or 2 per minute. If I call git push and then git pull immediately after, the git pull will hang and never finish. However, if I wait a minute, then the git pull command will work again.

I've tried many ways to configure working with two GitHub accounts on my computer. I use SSH so I have a proper ssh config file set up with two keys and separate hosts. This did not work. I'm currently using the .gitconfig method where I identify what ssh command to use per repo. This also does not work.

How can I diagnose the cause of this problem and how can I fix it?

My Setup:

  • macOS Monterey
  • Git version 2.37.1
  • Standard firewall and antivirtus (nothing special)

Thanks!

Microbob
  • 672
  • 5
  • 20
  • What OS and version of Git are you using? Are you using a non-default anti-virus or firewall, or any sort of other proxy or monitoring software? – bk2204 Aug 03 '22 at 21:28
  • Updated my post! – Microbob Aug 03 '22 at 23:32
  • For what it's worth, this *should not* be a problem, but people will probably need VonC's recommended trace output to figure out what's going on and why it actually *is* being a problem. :-) The trace output might not be sufficient as it probably involves some sort of lower level network glitch, but what that might be, I have no idea. – torek Aug 04 '22 at 08:44
  • (We've seen the occasional really-bizarre network glitch on macOS, though pre-Monterey, that a whole collection of networking nerds never managed to figure out, even with proper tracing tools and everything.) – torek Aug 04 '22 at 08:46

1 Answers1

0

You can enable logs, with GIT_TRACE2_EVENT (with trace2 presented here)

export GIT_TRACE2_EVENT=~/log.event

Then repeat your commands until being stuck, and you will see what Git was doing at the time of the issue.

VonC
  • 1,262,500
  • 529
  • 4,410
  • 5,250