0

When I try to pull, push, or generally do anything to interact with my remote git repo over ssh, the command always fails immediately on the first try but then succeeds if I run it right after for a second time.

The error I get is:

ssh: connect to host github.com port 22: Software caused connection abort
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

Once I've run the second (successful) command it seems to reset it and it becomes fine for a period of time, but then if I come back after a couple hours or so, the same occurs. I've tried some solutions from here but with no luck. Can anyone hazard any guesses as to where I can look to fix this?

Thanks

zing
  • 561
  • 3
  • 12
  • Sounds like a firewall that has port 22 closed but opens it on the 1st access; after some timeout it closes it again. The problem is not related to Git or SSH at all. Try to ask at Super User. – phd Jan 15 '23 at 08:36
  • @phd thanks for input. I did try accessing it over port 443 as in the post I linked, but seems 443 has the same symptom. It might be blocking a bunch, I'll head that direction thank you. – zing Jan 15 '23 at 09:05
  • "*…seems 443 has the same symptom.*" The same firewall, the same symptom. "*It might be blocking a bunch…*" Everything, most probably. – phd Jan 15 '23 at 09:32

0 Answers0