错误
git push -u origin master
Unauthorized
fatal: Could not read from remote repository.
(Bitbucket - Github)
解决办法
- 确定已在本地设置Git参数:
git config --global user.name "Your name" git config --global user.email "[email protected]"
- 确定当前系统的公钥已生成@ ~/.ssh/id_rsa.pub:查看生成方法
- (重要)将你的公钥从 当前库的访问密钥中删除掉,因为Bitbucket将其权限设置为“Read-only”:位置是REPO -> Settings -> Access keys
- (重要)将你的公钥写入Your profile -> bitbucket settings -> SSH-Keys