2017-09-27 59 views
0

我已經添加了我的SSH公鑰到我的到位桶ACCT時收到錯誤,這樣做,這樣的:克隆我的到位桶回購首次

[email protected]:~/Desktop/jobsrc$ git clone [email protected]:stremio/wifi-setup.git 
Cloning into 'wifi-setup'... 
repository access denied. deployment key is not associated with the requested repository. 
fatal: Could not read from remote repository. 

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

我不知道部署的關鍵是什麼,除了我很確定我不想要或不需要它。

任何想法?

我發現this page建議運行ssh -v [email protected]但我不知道如何解釋輸出。那就是:

[email protected]:~/Desktop/jobsrc$ ssh -v [email protected]       
OpenSSH_7.2p2 Ubuntu-4ubuntu2.2, OpenSSL 1.0.2g 1 Mar 2016 
debug1: Reading configuration data /etc/ssh/ssh_config 
debug1: /etc/ssh/ssh_config line 19: Applying options for * 
debug1: Connecting to bitbucket.org [104.192.143.2] port 22. 
debug1: Connection established. 
debug1: identity file /home/stefan/.ssh/id_rsa type 1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_rsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_dsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_dsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_ecdsa type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_ecdsa-cert type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_ed25519 type -1 
debug1: key_load_public: No such file or directory 
debug1: identity file /home/stefan/.ssh/id_ed25519-cert type -1 
debug1: Enabling compatibility mode for protocol 2.0 
debug1: Local version string SSH-2.0-OpenSSH_7.2p2 Ubuntu-4ubuntu2.2 
debug1: Remote protocol version 2.0, remote software version conker_1.0.311-c6337e4 app-126 
debug1: no match: conker_1.0.311-c6337e4 app-126 
debug1: Authenticating to bitbucket.org:22 as 'git' 
debug1: SSH2_MSG_KEXINIT sent 
debug1: SSH2_MSG_KEXINIT received 
debug1: kex: algorithm: [email protected] 
debug1: kex: host key algorithm: ssh-rsa 
debug1: kex: server->client cipher: aes128-ctr MAC: [email protected] compression: none 
debug1: kex: client->server cipher: aes128-ctr MAC: [email protected] compression: none 
debug1: expecting SSH2_MSG_KEX_ECDH_REPLY 
debug1: Server host key: ssh-rsa SHA256:zzXQOXSRBEiUtuE8AikJYKwbHaxvSc0ojez9YXaGp1A 
debug1: Host 'bitbucket.org' is known and matches the RSA host key. 
debug1: Found key in /home/stefan/.ssh/known_hosts:5 
debug1: rekey after 4294967296 blocks 
debug1: SSH2_MSG_NEWKEYS sent 
debug1: expecting SSH2_MSG_NEWKEYS 
debug1: rekey after 4294967296 blocks 
debug1: SSH2_MSG_NEWKEYS received 
debug1: SSH2_MSG_SERVICE_ACCEPT received 
debug1: Authentications that can continue: publickey 
debug1: Next authentication method: publickey 
debug1: Offering RSA public key: /home/stefan/.ssh/id_rsa 
debug1: Server accepts key: pkalg ssh-rsa blen 279 
debug1: Authentication succeeded (publickey). 
Authenticated to bitbucket.org ([104.192.143.2]:22). 
debug1: channel 0: new [client-session] 
debug1: Entering interactive session. 
debug1: pledge: network 
debug1: Sending environment. 
debug1: Sending env LC_PAPER = bg_BG.UTF-8 
debug1: Sending env LC_ADDRESS = bg_BG.UTF-8 
debug1: Sending env LC_MONETARY = bg_BG.UTF-8 
debug1: Sending env LC_NUMERIC = bg_BG.UTF-8 
debug1: Sending env LC_TELEPHONE = bg_BG.UTF-8 
debug1: Sending env LC_IDENTIFICATION = bg_BG.UTF-8 
debug1: Sending env LANG = en_US.UTF-8 
debug1: Sending env LC_MEASUREMENT = bg_BG.UTF-8 
debug1: Sending env LC_TIME = bg_BG.UTF-8 
debug1: Sending env LC_NAME = bg_BG.UTF-8 
PTY allocation request failed on channel 0 
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0 
authenticated via a deploy key. 

You can use git or hg to connect to Bitbucket. Shell access is disabled. 

This deploy key has read access to the following repositories: 

stremio/qca9377: [email protected] -- [email protected] 
debug1: channel 0: free: client-session, nchannels 1 
Connection to bitbucket.org closed. 
Transferred: sent 3508, received 1964 bytes, in 0.3 seconds 
Bytes per second: sent 13117.0, received 7343.7 
debug1: Exit status 0 

後來,我才知道,顯然我不能有一個按鍵同時作爲賬號密碼,併爲特定回購部署的關鍵。我確實將我的pubkey分配爲我公司1回購的部署密鑰。我問回購的管理員從那裏取出我的鑰匙,現在我得到一個不同的錯誤:

[email protected]:~/Desktop/jobsrc$ git clone [email protected]:stremio/wifi-setup.git 
Cloning into 'wifi-setup'... 
Permission denied (publickey). 
fatal: Could not read from remote repository. 

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

回答

0

發現了問題 - 我已經在視覺上比較PUBKEY的第10個左右的符號如圖所示通過cat並且如bitbucket的web UI所示;他們是一樣的,我認爲這足夠。但事實證明,無論出於何種原因,我的本地pubkey在最後添加了[email protected],而在bitbucket中註冊的那個沒有。我認爲這是唯一的區別。