美文网首页
Pycharm从github上clone代码,报错Permiss

Pycharm从github上clone代码,报错Permiss

作者: 木木木_亭 | 来源:发表于2020-09-28 16:23 被阅读0次

    如题:
    今天在使用pycharm从自己的私有仓库clone代码的时候,报错了:

    git@github.com: Permission denied (publickey).
    fatal: Could not read from remote repository.
    Please make sure you have the correct access rights
    and the repository exists.
    

    之前使用https方式clone这部分代码的时候从来没有出现过
    既然问题出现了,那就去百度看看是什么原因吧

    百度了之后,一众的解决方案是说要用ssh-key形式来clone可以解决这个办法

    好么,那就配置一下ssh-key好了

    首先,要找到你电脑的公钥和密钥


    image.png

    id_rsa为密钥,id_rsa.pub为公钥
    打开密钥文件,复制
    然后到github上,点击账号的setting


    image.png

    然后点击SSH and GPG Keys ,选择 New SSH Key


    image.png

    title随便填,把id_rsa.pub的内容复制到key对应的文本框中


    image.png

    添加成功后,你的key列表中会显示你刚刚添加的key,可以去clone一把了

    补充:至于为什么之前用https方式不会报错,但是现在报错了,可能是因为我上一次提交上传了大量大文件导致的

    相关文章

      网友评论

          本文标题:Pycharm从github上clone代码,报错Permiss

          本文链接:https://www.haomeiwen.com/subject/xpvduktx.html