在linux上git clone時遇到
fatal: unable to access 'https://github.com/xx/xx.git/': Failed connect to github.com:443; Connection timed out時如圖
解決方法:把https:改成git
git clone git@github.com:xx/xx.git
如果沒有成功,遇上以下報錯
no such identity: /root/.ssh/id_rsa: No such file or directory
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
配置用戶名,郵箱
git config --global user.email "123@126.com"
給該郵箱設(shè)置公鑰
ssh-keygen -t rsa -C "123@126.com"
回車三次后 得到如圖
?設(shè)置成功后進入~/.ssh,
cd ~/.ssh
cat id_rsa.pub
?文章來源地址http://www.zghlxwxcb.cn/news/detail-743114.html
?復(fù)制公鑰(ssh-rsa到郵箱那一塊就是了)到github上的settings上添加設(shè)置的公鑰
?
后面再回linux上重新克隆就沒有問題了?文章來源:http://www.zghlxwxcb.cn/news/detail-743114.html
?
到了這里,關(guān)于fatal: unable to access ‘https://github.com/xxx/123.git/‘: Failed connect to github.com:443 解決方案的文章就介紹完了。如果您還想了解更多內(nèi)容,請在右上角搜索TOY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!