Home>

Push to Bitbucket, run$git push origin master

fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
I get an error with

. (Permission denied does not appear)

Ssh key is set. (There are id_rsa, id_rsa.pub, known_hosts under ~/.ssh)
Of course origin is also set as a remote repository for Bitbucket.

I wrote "some times" in the title because when I try to connect with$ssh -T [email protected], the message doesn't return several times, Finally after 3 or 4 times,

logged in as<username&gt ;.
You can use git or hg to connect to Bitbucket.Shell access is disabled.</Code></pre>
The message<p>comes in. Here<code>$git push</code>succeeds.</p>
<p>In other words, I think it is a problem with ssh connection, but I can't find a similar case on the net.</p>
<p>Addition: Log when failing (sorry for throwing)</p>
<pre><code>OpenSSH_7.6p1, LibreSSL 2.6.2
debug1: Reading configuration data/etc/ssh/ssh_config
debug1:/etc/ssh/ssh_config line 48: Applying options for *
debug1: Connecting to bitbucket.org port 22.
debug1: Connection established.
debug1: identity file /Users/&lt;username&gt;/.ssh/id_rsa type 0
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_rsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_dsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_dsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_ecdsa type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_ecdsa-cert type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_ed25519 type -1
debug1: key_load_public: No such file or directory
debug1: identity file /Users/&lt;username&gt;/.ssh/id_ed25519-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6
debug1: Remote protocol version 2.0, remote software version conker_1.1.13-7af6557 app-131
debug1: no match: conker_1.1.13-7af6557 app-131
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-&gt;client cipher: [email protected] MAC:&lt;implicit&gt;compression: none
debug1: kex: client-&gt;server cipher: [email protected] MAC:&lt;implicit&gt;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 /Users/&lt;username&gt;/.ssh/known_hosts:1
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: SSH2_MSG_SERVICE_ACCEPT received
debug1: Authentications that can continue: publickey
debug1: Next authentication method: publickey
debug1: Offering public key: RSA SHA256:&lt;Public Key&gt;/Users/&lt;Username&gt;/.ssh/id_rsa
debug1: Server accepts key: pkalg ssh-rsa blen 279
Enter passphrase for key '/Users/&lt;username&gt;/.ssh/id_rsa':
Connection closed by 2406: da00: ff00 :: 22cd: e0db port 22