I am trying to clone a repo from github. To do that
I have generated a ssh key using: ssh-keygen.
Then I added the content of ~/.ssh/id_rsa.pub to my keys in github account.
Even after that I am unable to clone any repo. I am getting following error:
ssh_exchange_identification: read: Operation timed out
Please make sure you have the correct access rights
and the repository exists.
In this regard, I have gone through a few posts here, but unable to fix.
NOTE: This error I am facing even after removing SSH key from my github account.
EDIT: When I am doing "ssh -T [email protected]", I am getting the same error:
ssh_exchange_identification: read: Operation timed out
As suggested in: https://help.github.com/en/articles/error-permission-denied-publickey, while executing following commands:
1. ssh-add -l ==> The agent has no identities.
2. ssh-add -l -E md5 ==> The agent has no identities.
You get this error for one of these 3 reasons:
Do the following:
first in your terminal run ssh -T [email protected] if you see your GitHub username in response. you know that you are authenticated properly if not...
first check internet access: make sure you can access GitHub by cloning a public repo (any repo) by SSH (not https). if you fail here you have problems with SSH or internet connection
if this step passed, try to clone one of your other private repos by ssh. if you failed. you have an authentication problem and your ssh key is wrong. (try again by https and compare the results)
if this step passed, try to clone this repo by https (not ssh). if you failed. you have an authorization problem and you have no access to this repo
One of the solutions that worked for me was setting ssh config.
Create and open config file:
sudo nano ~/.ssh/config
Add following lines and save:
Host github.com
Hostname ssh.github.com
Port 443
ssh -T [email protected]Now you can clone the repo.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With