2017-05-30 179 views
1

我剛剛在bitbucket上創建了git repo。然後,我創建通過後續的SSH密鑰:當從bitbucket克隆git repo時,權限被拒絕(publickey)

1. ssh-keygen -t rsa -C '[email protected]' 
    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連接的git像[email protected]: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. 

我不知道什麼是我錯在這裏,請幫我解決它。

+0

替代調試是克隆回購HTTPS方式 – KOTIOS

回答

2

你的SSH代理可能無法正常工作:

eval `ssh-agent -s` 
ssh-add 

但是,只有當您生成一個密碼保護的SSH密鑰需要一個代理。
如果沒有,您的ssh密鑰可以開箱即用。

在Linux上,檢查gnome-keyring which can interfere

如果問題仍然存在,ssh -Tv [email protected]

相關問題