300字范文,内容丰富有趣,生活中的好帮手!
300字范文 > Git提交错误:Permission denied (publickey) fatal: Could not read from remote reposito

Git提交错误:Permission denied (publickey) fatal: Could not read from remote reposito

时间:2022-01-06 02:13:17

相关推荐

Git提交错误:Permission denied (publickey) fatal: Could not read from remote reposito

错误提示:

Permission denied (publickey).

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

沃德天,谁动我电脑了,昨天还好好的~~~~~

昨天->操作过id_rsa_pub文件

是谁???这么不要脸

好像是我。。。

好吧重新配置下公钥:

执行:ssh-keygen -t rsa -C “邮箱地址”

然后出现: Enter file in which to save the key (/Users/wyd/.ssh/id_rsa):(公钥名称,默认是 id_rsa.pub)

之前连接别的重新生成了id_rsa.pub,就是没有写名字一路回车爽啊,之前的id_rsa.pub被新的覆盖了,之后杯具就是无法连接git了

所以我们这里写test(我是随便起的,你们随意)

然后一路回车吧

来看生成的文件:

最后关键的一步:将自己起的名字加入到ssh中

ssh-add ~/.ssh/test

然后复制test.pub内容到git的ssh文件中,这样就妥了

插曲:记得去掉文件的换行,怎么换——>google

本内容不代表本网观点和政治立场,如有侵犯你的权益请联系我们处理。
网友评论
网友评论仅供其表达个人看法,并不表明网站立场。