简体   繁体   English

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

[英]Permission denied (publickey) when clone git repo from bitbucket

I just created the git repo on bitbucket. 我刚刚在bitbucket上创建了git repo。 Then I create the ssh key by follow: 然后我按照以下方式创建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

After that I chose SSH link git like git@bitbucket.org:DienVo/abc.git , but In the terminal it show that 之后我选择了SSH链接git,比如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.

I don't know what is I wrong here, please help me to resolve it. 我不知道我错在哪里,请帮我解决。

Your ssh agent might not be working: 您的ssh代理可能无法正常工作:

eval `ssh-agent -s` 
ssh-add

But you only need an agent if you generated an ssh key protected with a passphrase. 但是,如果您生成了使用密码短语保护的ssh密钥,则只需要代理。
If not, your ssh key would work out of the box. 如果没有,您的ssh密钥将开箱即用。

On Linux, check gnome-keyring which can interfere . 在Linux上,检查可能会干扰的gnome-keyring

If the issue persists, debug with ssh -Tv git@bitbucket.org 如果问题仍然存在,请使用ssh -Tv git@bitbucket.org调试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM