當(dāng)執(zhí)行g(shù)it命令如:git clone、git pull等等
出現(xiàn)報(bào)錯(cuò):ssh: connect to host github.com port 22: Connection timed outfatal: Could not read from remote repository.Please make sure you have the correct access rightsand the repository exists.
問(wèn)題主要出在是ssh密鑰上,需要重置密鑰,而且在git上添加
打開(kāi)cmd
?
輸入命令
ssh-keygen -t rsa -C "您的email"
一路回車,遇到(y/n)選擇?y
在用戶的.ssh下生成了兩個(gè)SSH Key的秘鑰對(duì),id_rsa是私鑰,不能泄露出去,id_rsa.pub是公鑰,可以放心地告訴任何人。一般在c盤下查看
?去git上設(shè)置密鑰
1.
?2.打開(kāi)本地的id_rsa.pub(公鑰),將內(nèi)容復(fù)制進(jìn)去即可
?文章來(lái)源:http://www.zghlxwxcb.cn/news/detail-725974.html
github端配置完畢即可推送代碼。文章來(lái)源地址http://www.zghlxwxcb.cn/news/detail-725974.html
到了這里,關(guān)于ssh: connect to host github.com port 22: Connection refusedfatal: Could not read from remote reposi的文章就介紹完了。如果您還想了解更多內(nèi)容,請(qǐng)?jiān)谟疑辖撬阉鱐OY模板網(wǎng)以前的文章或繼續(xù)瀏覽下面的相關(guān)文章,希望大家以后多多支持TOY模板網(wǎng)!