ssh-keygen -t rsa -C 2439522@qq.com..."/>
溫馨提示×

您好,登錄后才能下訂單哦!

密碼登錄×
登錄注冊(cè)×
其他方式登錄
點(diǎn)擊 登錄注冊(cè) 即表示同意《億速云用戶(hù)服務(wù)條款》

git公鑰出錯(cuò)"http://.ssh/id_rsa" failed: No such file or dir

發(fā)布時(shí)間:2020-09-15 08:40:23 來(lái)源:網(wǎng)絡(luò) 閱讀:3626 作者:songfasong 欄目:開(kāi)發(fā)技術(shù)

簡(jiǎn)介:ssh-keygen使用時(shí)出現(xiàn)以下問(wèn)題時(shí),使用以管理員身份運(yùn)行的“命令提示符”來(lái)生成公鑰,即可解決:

C:\Users\admin> ssh-keygen -t rsa -C "2439522@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (//.ssh/id_rsa):
Could not create directory '//.ssh': Read-only file system
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Saving key "//.ssh/id_rsa" failed: No such file or directory

原因:主要是因?yàn)槠渲杏芯涿枋觯骸癈ould not create directory '//.ssh': Read-only file system”,表明改文件是只讀的,即沒(méi)有寫(xiě)的權(quán)限。
解決辦法: 以管理員身份運(yùn)行“命令提示符,之后重新使用“命令提示符”來(lái)生成ssh-key
1.win10:
git公鑰出錯(cuò)

2.win7:
單擊“開(kāi)始”按鈕,再選擇“所有程序”,選擇“附件”,再選擇“命令提示符”命令,從彈出的菜單中選擇“以管理員身份運(yùn)行”命令。

向AI問(wèn)一下細(xì)節(jié)

免責(zé)聲明:本站發(fā)布的內(nèi)容(圖片、視頻和文字)以原創(chuàng)、轉(zhuǎn)載和分享為主,文章觀點(diǎn)不代表本網(wǎng)站立場(chǎng),如果涉及侵權(quán)請(qǐng)聯(lián)系站長(zhǎng)郵箱:is@yisu.com進(jìn)行舉報(bào),并提供相關(guān)證據(jù),一經(jīng)查實(shí),將立刻刪除涉嫌侵權(quán)內(nèi)容。

AI