第一次使用bitbucket,尝试将本地项目第一次推送到bitbucket。
我成功创建了一个没有问题的存储库。在我创建一个新的 SSH key 后,我将其加载到 Bitbucket 和 Paget(在我的 Windows 后台运行)。
当我尝试将我的提交推送到 Bitbucket 时,我仍然得到以下信息:
git -c diff.mnemonicprefix=false -c core.quotepath=false push -v --tags --set-upstream origin master:master
Pushing to user@bitbucket.user/repository.git
repository access denied. access via a deployment key is read-only.
fatal: Could not read from remote repository.
Please make sure you have the correct access rights and the repository exists.
Completed with errors, see above.
在 Bitbucket -> 项目 -> 设置 -> 访问键上: 它在这里说,按原样复制和粘贴:
Use access keys to gain read-only access to this repository. Learn more about using SSH keys.
这是否意味着我不能使用 SSH key 来推送到存储库?
PS:我尝试了所有可用的解决方案来解决这个问题,但我仍然得到同样的错误(重新生成 key ,尝试使用 SourceTree 或 GitShell 进行推送,仍然出现同样的错误);欢迎任何其他想法
谢谢
最佳答案
I managed to finally make a push through git shell, by creating a new key where you specified (Acc->Security->SSH Keys); still does not seem to want to work with SourceTree
检查 SourceTree 是否配置为使用嵌入式 git 或系统 Git(后者是您安装的 Git。并确保您的 SourceTree 使用您的帐户运行。
OP Marin在评论中添加:
I managed to do all that in the end after setting a new ssh key for the account not the project and adding it to Pagent.
I managed to sort the issue quite quickly after the initial commit and push through Git Shell, I just checked out the repository using SourceTree and it worked (also my account was already linked to SourceTree)
关于git - Bitbucket 访问 key 只能用于只读?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/46893328/