Git push错误,Unauthorized fatal: Could not read from remote repository.未验证不能提交

错误

git push -u origin master

Unauthorized

fatal: Could not read from remote repository.

(Bitbucket - Github)

解决办法

  1. 确定已在本地设置Git参数:
    git config --global user.name "Your name"
    git config --global user.email "[email protected]"
  2. 确定当前系统的公钥已生成@ ~/.ssh/id_rsa.pub查看生成方法 
  3. 重要将你的公钥从 当前库的访问密钥中删除掉,因为Bitbucket将其权限设置为“Read-only”:位置是REPO -> Settings -> Access keys
  4. 重要)将你的公钥写入Your profile -> bitbucket settings -> SSH-Keys

发布了166 篇原创文章 · 获赞 58 · 访问量 66万+

猜你喜欢

转载自blog.csdn.net/qq285744011/article/details/103545770