SSH推送到仓库出现:Permission denied, please try again.

一. 终端出现的提示:

  • 第一种提示:
    tucici@tucicideMac-mini GVoice % git push
    [email protected]'s password: 
    Permission denied, please try again.
    [email protected]'s password: 
    Permission denied, please try again.
    [email protected]'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, please try again.)