Bitbucket的特别回购不会让我推动:' conq:存储库访问被拒绝。'

时间:2016-07-22 08:30:55

标签: git bitbucket ssh-keys

我在Stack Overflow上看到过很多类似的问题,但是在尝试了所有步骤之后我已经用尽了一些东西。希望别人能发现一些东西。这是我尝试过的(这适用于Mac):

  1. 我专门为Bitbucket创建了一个键id_bbu
  2. 我已将密钥id_bbu.pub添加到我的Bitbucket帐户(我绝对没有添加任何内容作为部署密钥)
  3. 我已将此密钥添加到ssh-agent。当我运行ssh-add -l时,我会显示3个键:id_bbuid_rsaid_git
  4. 我已将密钥添加到我的~/.ssh/config文件
  5. 其中包括:

     host IBM github
     hostName gain-github.com
     IdentityFile ~/.ssh/id_rsa
    
     host github.com
     hostName github.com
     IdentityFile ~/.ssh/id_git
    
     Host bitbucket.org
      IdentityFile ~/.ssh/id_bbu
      PreferredAuthentications publickey
    
    1. ssh -Tv git@bitbucket.org的输出如下(实际值已更改)
    2. OpenSSH_6.2p2,OSSLShim 0.9.8r 2011年12月8日

      debug1: Reading configuration data /Users/me/.ssh/config
      debug1: /Users/me/.ssh/config line 9: Applying options for bitbucket.org
      debug1: Reading configuration data /etc/ssh_config
      debug1: /etc/ssh_config line 20: Applying options for *
      debug1: Connecting to bitbucket.org [104.192.456.2] port 22.
      debug1: Connection established.
      debug1: identity file /Users/me/.ssh/id_bbu type 1
      debug1: identity file /Users/me/.ssh/id_bbu-cert type -1
      debug1: Enabling compatibility mode for protocol 2.0
      debug1: Local version string SSH-2.0-OpenSSH_6.2
      debug1: Remote protocol version 2.0, remote software version conker_1.0.210.0xhgg76
      debug1: no match: conker_1.0.210.0xhgg76
      debug1: SSH2_MSG_KEXINIT sent
      debug1: SSH2_MSG_KEXINIT received
      debug1: kex: server->client afd128-ctr hmac-sha1 none
      debug1: kex: client->server afd128-ctr hmac-sha1 none
      debug1: sending SSH2_MSG_KEXDH_INIT
      debug1: expecting SSH2_MSG_KEXDH_REPLY
      debug1: Server host key: RSA 97:8c:2f:f5:7u:45:6v:5c:3b:ec:aa:46:49:76:6y:40
      debug1: Host 'bitbucket.org' is known and matches the RSA host key.
      debug1: Found key in /Users/me/.ssh/known_hosts:9
      debug1: ssh_rsa_verify: signature correct
      debug1: SSH2_MSG_NEWKEYS sent
      debug1: expecting SSH2_MSG_NEWKEYS
      debug1: SSH2_MSG_NEWKEYS received
      debug1: Roaming not allowed by server
      debug1: SSH2_MSG_SERVICE_REQUEST sent
      debug1: SSH2_MSG_SERVICE_ACCEPT received
      debug1: Authentications that can continue: publickey
      debug1: Next authentication method: publickey
      debug1: Offering RSA public key: /Users/me/.ssh/id_bbu
      debug1: Server accepts key: pkalg ssh-rsa blen 542
      debug1: Authentication succeeded (publickey).
      Authenticated to bitbucket.org ([124.183.124.2]:22).
      debug1: channel 0: new [client-session]
      debug1: Entering interactive session.
      debug1: Sending environment.
      debug1: Sending env LANG = en_GB.UTF-8
      logged in as myusername.
      
      You can use git or hg to connect to Bitbucket. Shell access is disabled.
      debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
      debug1: channel 0: free: client-session, nchannels 1
      Transferred: sent 3896, received 2208 bytes, in 0.2 seconds
      Bytes per second: sent 21554.4, received 12215.6
      debug1: Exit status 0
      
      1. 然而,当我使用git push -u origin --all
      2. 推送到bitbucket时

        我明白了:

        conq: repository access denied.
        fatal: Could not read from remote repository.
        
        Please make sure you have the correct access rights and the repository exists.
        
        1. 我尝试删除存储库并创建一个新存储库。我也尝试删除这些密钥并生成一个具有不同名称的新对。

        2. 以防万一造成问题,

        3. 这是我的项目的.git / config文件:

          [core]
              repositoryformatversion = 0
              filemode = false
              bare = false
              logallrefupdates = true
              ignorecase = true
              precomposeunicode = true
          [remote "origin"]
              url = git@bitbucket.org:myaccount/my-repo.git
              fetch = +refs/heads/*:refs/remotes/origin/*
          [branch "master"]
              remote = origin
              merge = refs/heads/master
          
          1. 我已经完成了所有故障排除here以及Stack Overflow上的其他地方,但无济于事。
          2. 同一帐户上的其他回购也有同样的问题,无论我推还是拉,都会发生这种情况。
          3. 我可以尝试的任何其他内容或上述任何明显的东西吗?

            由于

0 个答案:

没有答案