Reputation: 8487
I suddenly started getting the following error message while attempting to push or pull:
ssh: connect to host github.com port 22: Operation timed out
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
How can I check If I have the "correct access rights"? I've been working on this repository for quite some time and never had issues.
What am I doing wrong?
Upvotes: 2
Views: 8436
Reputation: 153
Don't know if someone still needs a solution to this. Went through the same problem and I found a solution with the link below.
Create or edit ~/.ssh/config
and append the following:
Host github.com
Hostname ssh.github.com
Port 443
You can read from here: https://amesbury.it/git/github/2018/05/15/port22-blocked-github.html
Upvotes: 11
Reputation: 1483
I had the same issue and fixed it by removing the github entry from the ~/.ssh/known_hosts
file.
Upvotes: 0