从bitbucket克隆git repo时权限被拒绝(公钥)

从bitbucket克隆git repo时权限被拒绝(公钥),git,bitbucket,ssh-keys,Git,Bitbucket,Ssh Keys,我刚刚在bitbucket上创建了git回购。然后,我通过以下方式创建ssh密钥: 1. ssh-keygen -t rsa -C 'dien.vo@asnet.com.vn' 2. ssh-keygen (press enter more) 3. cat ~/.ssh/id_rsa.pub --> it return for me a SSH key 4. Coppy that and added on bitbucket, then I save the new

我刚刚在bitbucket上创建了git回购。然后,我通过以下方式创建ssh密钥:

   1. ssh-keygen -t rsa -C 'dien.vo@asnet.com.vn'
   2. ssh-keygen (press enter more)
   3. cat ~/.ssh/id_rsa.pub --> it return for me a SSH key
   4. Coppy that and added on bitbucket, then I save the new SSH key
之后,我选择了SSH-link-git-like
git@bitbucket.org:DienVo/abc.git
,但在终端中显示

sign_and_send_pubkey: signing failed: agent refused operation
Permission denied (publickey).
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我不知道这里出了什么问题,请帮我解决。

您的ssh代理可能无法工作:

eval `ssh-agent -s` 
ssh-add
但只有在生成了受密码短语保护的ssh密钥时,才需要代理。
如果没有,您的ssh密钥将立即可用

在Linux上,检查


如果问题仍然存在,请使用
ssh-Tv进行调试git@bitbucket.org

另一种选择是克隆repo HTTPS waysAlright@VonC,您的建议部分解决了我的问题,但在执行git pull时,我还是会得到提示输入密码。尽管ssh-Tvgit@bitbucket.org和ssh-Tgit@bitbucket.org告诉我“您可以使用git或hg连接到Bitbucket。Shell访问被禁用。”。我真的不明白:S@CarlosAlbertoMartínezGadea确实
ssh-Tgit@bitbucket.org
是否显示“欢迎”信息?git remote-v返回什么?你真的在从bitbucket中提取吗?是的,
ssh-Tgit@bitbucket.org
显示一条欢迎消息,表示我已登录。同样的创建SSH密钥的过程也适用于我的Macbook Air。我是从垃圾桶里挖出来的。出现在带有
ssh-T的欢迎消息中的同一用户git@bitbucket.org
出现在git remote-v指向我的BitBucket存储库的结果中。我有点迷路了:S@CarlosAlbertoMartínezGadea“git remote-v确实会在远程URL上返回https。为什么会有问题?”:这是一个问题,因为https意味着所有SSH设置都没有意义。它仍然需要您的远程用户帐户名/密码,而这与SSH无关。您可能会考虑使用证书助手,比如Linux上的LIbTebug(我将查看这些链接)。谢谢所有的帮助。