美文网首页
SSH推送到仓库出现:Permission denied, pl

SSH推送到仓库出现:Permission denied, pl

作者: 突刺刺 | 来源:发表于2021-09-06 11:52 被阅读0次

    一. 终端出现的提示:

    • 第一种提示:
      tucici@tucicideMac-mini GVoice % git push
      git@47.114.45.10's password: 
      Permission denied, please try again.
      git@47.114.45.10's password: 
      Permission denied, please try again.
      git@47.114.45.10's password: 
      
    • 第二种提示:
      Permission denied 
      (publickey,gssapi-keyex,gssapi-with-mic,password).
      fatal: Could not read from remote repository.  
      Please make sure you have the correct access rights and the repository exists. 
      

    二. 原因:

    • 前提 :
      • rsa正常生成情况下ssh-keygen -t rsa -C xxx
      • rsa_pub正常添加到仓库sshKey

    这是因为,创建了rsa,没有添加到本地ssh,所以本地ssh不识别你创建的这个rsa,自然推不上去了。

    三. 解决:

    • 让ssh识别新创建的rsa私钥
      ssh-add /Users/tucici/Documents/ras
      
    • 添加SSH到钥匙串
      ssh-add -K /Users/tucici/Documents/ras
      

    相关文章

      网友评论

          本文标题:SSH推送到仓库出现:Permission denied, pl

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