Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Github connect to host github.com port 22: Operation timed out

Tags:

git

terminal

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?

like image 269
gespinha Avatar asked Jun 10 '26 17:06

gespinha


1 Answers

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

like image 169
Kalkulus Avatar answered Jun 12 '26 07:06

Kalkulus