git clone [email protected]:snuglove/ 报错

[root@qc_centos7_5 ~]# git clone [email protected]:snuglove/Job-hunting-related.git
Cloning into 'Job-hunting-related'...
ssh: connect to host github.com port 22: Connection timed out
fatal: Could not read from remote repository.

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

在/root/.ssh/添加config文件后解决

vim  /root/.ssh/config 内容如下:

Host github.com
User [email protected]             #此处填写你的github账户,其他地方不变
Hostname ssh.github.com
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_rsa
Port 443

猜你喜欢

转载自www.cnblogs.com/snuglove/p/10666224.html