解决bitbucket中conq:repository access denied

刚开始接触Bitbucket,它提供的私有仓库真是好东西。每件新事物都不会让人太省心。这个问题折腾了一早上~

我使用git push -u origin master时,提示我下面两个错误:

"conq: repository access denied. access via a deployment key is read-only."

"deployment key is not associated with the requested repository."

解决方法如下:

 

Bitbucket在两个地方可以添加你的ssh key,分别在你的repository settings 和manage account中。

repository中添加的ssh key称为deployment key,在account中添加的ssh key叫account key。

如果repository中设置了你的account具有write以上的权限,那么使用account key才对该repository有write 权限。

在repository中添加的ssh key(deployment key)是read-only。要想使用ssh的方式提交代码,你必须设置你的account key。

如果你遇见了和我一样的问题:

你需要去删除deployment key再把你的ssh key添加到你的account key中!

如果你在添加account key的时候,提示你

“Someone has already registered this as an deployment SSH key.”

你可以在shell中输入"ssh -T git@bitbucket.org"

会告诉你在哪些仓库设置了deployment key,然后去仓库中删除。

 

 

 

 

 

posted @ 2015-05-27 16:20  P.wang  阅读(2471)  评论(1编辑  收藏  举报