1

I had this error occur to me while trying to do a git push (previously I've had no issues connecting to remote):

ssh: connect to host github.com port 22: Resource temporarily unavailable
fatal: Could not read from remote repository.

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

I realized this was caused by the internet connection, as when I switched the wi-fi I no longer had this error and was again able to connect to github.

My question is: Does anybody know why this error occurs, and is there a way to avoid this?

This happens with my university wi-fi and it would be a shame if I cannot use github there.

  • 1
    "Resource temporarily unavailable" usually corresponds to an overloaded machine (EAGAIN error => out of memory / swap space), but this does depend on a lot of other things. When you get this sort of error it may be worth running with GIT_TRACE=1 or system tracing (`strace` on Linux). – torek Mar 16 '22 at 22:37

1 Answers1

0

I had the same issue today. What fixed it for me was running ssh -T git@github.com in my bash terminal.

Which should return:

Hi {GitHubUserName}! You've successfully authenticated, but GitHub does not provide shell access.

I did git push after this and it went through.

Other threads suggest it might be a firewall issue

RockiRider
  • 101
  • 7