bitbucket??SSH?????????
Asked by Hiroyuki Sekiguchi:

bitbucket?????????????????????????????????

git clone git@bitbucket.org:xxxx/yyyy.git

???

Forbidden  
fatal: Could not read from remote repository.

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

???bitbucket?Personal Settings?SSH????????????????

??SSH?????????????

????????????????????????????????????

?????????????

?HTTP????????????????????HTTP?????????????????????SSH????????????


Answers:
author: Hiroyuki Sekiguchi
body: ??????????????

????????????????hiroyuki-sekiguchi????????????????????????????????????????????????????

```
ssh -T git@bitbucket.org
```

??????????????????????????????????????????????

11:08:48.361069 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin  
11:08:48.362041 git.c:419 trace: built-in: git clone git@bitbucket.org:i-meisters/manga100website.git  
Cloning into 'xxxxxxxxxxxx'...  
11:08:48.376031 run-command.c:643 trace: run_command: unset GIT_DIR; 'ssh -v' git@bitbucket.org 'git-upload-pack '\\''yyyyyyyyyyy/xxxxxxxxxxxxxxxxxx.git'\\'''  
OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018  
debug1: Reading configuration data /etc/ssh/ssh_config  
debug1: Connecting to bitbucket.org \[2406:da00:ff00::22c0:3470\] port 22.  
debug1: Connection established.  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa type 0  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_dsa type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_dsa-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ecdsa type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ecdsa-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ed25519 type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ed25519-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_xmss type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_xmss-cert type -1  
debug1: Local version string SSH-2.0-OpenSSH_7.9  
debug1: Remote protocol version 2.0, remote software version conker_f765b92162-dirty app-162  
debug1: no match: conker_f765b92162-dirty app-162  
debug1: Authenticating to bitbucket.org:22 as 'git'  
debug1: SSH2_MSG_KEXINIT sent  
debug1: SSH2_MSG_KEXINIT received  
debug1: kex: algorithm: curve25519-sha256@libssh.org  
debug1: kex: host key algorithm: ssh-rsa  
debug1: kex: server-\>client cipher: chacha20-poly1305@openssh.com MAC: \<implicit\> compression: none  
debug1: kex: client-\>server cipher: chacha20-poly1305@openssh.com MAC: \<implicit\> 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 /c/Users/Hiroyuki Sekiguchi/.ssh/known_hosts:3  
debug1: rekey after 134217728 blocks  
debug1: SSH2_MSG_NEWKEYS sent  
debug1: expecting SSH2_MSG_NEWKEYS  
debug1: SSH2_MSG_NEWKEYS received  
debug1: rekey after 134217728 blocks  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa RSA SHA256:fIvDUMZPt0OAGp0KdqFaOyzekpoYfqpP5ctPlOHmA7U  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_dsa  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_ecdsa  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_ed25519  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_xmss  
debug1: SSH2_MSG_SERVICE_ACCEPT received  
debug1: Authentications that can continue: publickey  
debug1: Next authentication method: publickey  
debug1: Offering public key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa RSA SHA256:fIvDUMZPt0OAGp0KdqFaOyzekpoYfqpP5ctPlOHmA7U  
debug1: Server accepts key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa RSA SHA256:fIvDUMZPt0OAGp0KdqFaOyzekpoYfqpP5ctPlOHmA7U  
Enter passphrase for key '/c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa':  
debug1: Authentication succeeded (publickey).  
Authenticated to bitbucket.org (\[2406:da00:ff00::22c0:3470\]:22).  
debug1: channel 0: new \[client-session\]  
debug1: Entering interactive session.  
debug1: pledge: network  
debug1: Sending command: git-upload-pack 'yyyyyyyyyyy/xxxxxxxxxxxxxxxxxxx.git'  
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0  
Forbidden  
debug1: channel 0: free: client-session, nchannels 1  
fatal: Could not read from remTransferred: sent 3528, received 2008 bytes, in 0.4 seconds  
ote reposiBytes per second: sent 8836.1, received 5029.1  
torydebug1: Exit status 1

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


author: K. Yamamoto
body: ????????????
> ?????????????
>
> **??SSH?????????????**
>
> ?????????????

?????Bitbucket??????SSH???????????????????????????????????????????????????????????????????????????????????

```
ssh -T git@bitbucket.org
```

?????????? [Someone has already registered that SSH key](https://ja.confluence.atlassian.com/bbkb/someone-has-already-registered-that-ssh-key-338365482.html) ????????

> ???????????????????????

???SSH??????????????????????????????????????????????????????????

```
GIT_TRACE_PACKET=1 GIT_TRACE=1 GIT_SSH_COMMAND="ssh -v" GIT_CURL_VERBOSE=1 git clone git@bitbucket.org:xxxx/yyyy.git
```

comments: author: Hiroyuki Sekiguchi
body: ??????????????????

????????????????hiroyuki-sekiguchi????????????????????????????????????????????????????

```
ssh -T git@bitbucket.org
```

??????????????????????????????????????????????

11:08:48.361069 exec-cmd.c:236 trace: resolved executable dir: C:/Program Files/Git/mingw64/bin  
11:08:48.362041 git.c:419 trace: built-in: git clone git@bitbucket.org:yyyyyyyyy/xxxxxxxxxxx.git  
Cloning into 'xxxxxxxxxxxx'...  
11:08:48.376031 run-command.c:643 trace: run_command: unset GIT_DIR; 'ssh -v' git@bitbucket.org 'git-upload-pack '\\''yyyyyyyyyyy/xxxxxxxxxxxxxxxxxx.git'\\'''  
OpenSSH_7.9p1, OpenSSL 1.1.1a 20 Nov 2018  
debug1: Reading configuration data /etc/ssh/ssh_config  
debug1: Connecting to bitbucket.org \[2406:da00:ff00::22c0:3470\] port 22.  
debug1: Connection established.  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa type 0  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_dsa type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_dsa-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ecdsa type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ecdsa-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ed25519 type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_ed25519-cert type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_xmss type -1  
debug1: identity file /c/Users/Hiroyuki Sekiguchi/.ssh/id_xmss-cert type -1  
debug1: Local version string SSH-2.0-OpenSSH_7.9  
debug1: Remote protocol version 2.0, remote software version conker_f765b92162-dirty app-162  
debug1: no match: conker_f765b92162-dirty app-162  
debug1: Authenticating to bitbucket.org:22 as 'git'  
debug1: SSH2_MSG_KEXINIT sent  
debug1: SSH2_MSG_KEXINIT received  
debug1: kex: algorithm: curve25519-sha256@libssh.org  
debug1: kex: host key algorithm: ssh-rsa  
debug1: kex: server-\>client cipher: chacha20-poly1305@openssh.com MAC: \<implicit\> compression: none  
debug1: kex: client-\>server cipher: chacha20-poly1305@openssh.com MAC: \<implicit\> 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 /c/Users/Hiroyuki Sekiguchi/.ssh/known_hosts:3  
debug1: rekey after 134217728 blocks  
debug1: SSH2_MSG_NEWKEYS sent  
debug1: expecting SSH2_MSG_NEWKEYS  
debug1: SSH2_MSG_NEWKEYS received  
debug1: rekey after 134217728 blocks  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa RSA SHA256:fIvDUMZPt0OAGp0KdqFaOyzekpoYfqpP5ctPlOHmA7U  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_dsa  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_ecdsa  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_ed25519  
debug1: Will attempt key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_xmss  
debug1: SSH2_MSG_SERVICE_ACCEPT received  
debug1: Authentications that can continue: publickey  
debug1: Next authentication method: publickey  
debug1: Offering public key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa RSA SHA256:fIvDUMZPt0OAGp0KdqFaOyzekpoYfqpP5ctPlOHmA7U  
debug1: Server accepts key: /c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa RSA SHA256:fIvDUMZPt0OAGp0KdqFaOyzekpoYfqpP5ctPlOHmA7U  
Enter passphrase for key '/c/Users/Hiroyuki Sekiguchi/.ssh/id_rsa':  
debug1: Authentication succeeded (publickey).  
Authenticated to bitbucket.org (\[2406:da00:ff00::22c0:3470\]:22).  
debug1: channel 0: new \[client-session\]  
debug1: Entering interactive session.  
debug1: pledge: network  
debug1: Sending command: git-upload-pack 'yyyyyyyyyyy/xxxxxxxxxxxxxxxxxxx.git'  
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0  
Forbidden  
debug1: channel 0: free: client-session, nchannels 1  
fatal: Could not read from remTransferred: sent 3528, received 2008 bytes, in 0.4 seconds  
ote reposiBytes per second: sent 8836.1, received 5029.1  
torydebug1: Exit status 1

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


Tags: bitbucket

language-ja