Push to Bitbucket, run
$git push origin master
I get an error with
fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
. (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> ;. 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/<username>/.ssh/id_rsa type 0 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.ssh/id_rsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.ssh/id_dsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.ssh/id_dsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.ssh/id_ecdsa type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.ssh/id_ecdsa-cert type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.ssh/id_ed25519 type -1 debug1: key_load_public: No such file or directory debug1: identity file /Users/<username>/.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->client cipher: [email protected] MAC:<implicit>compression: none debug1: kex: client->server cipher: [email protected] 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 /Users/<username>/.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:<Public Key>/Users/<Username>/.ssh/id_rsa debug1: Server accepts key: pkalg ssh-rsa blen 279 Enter passphrase for key '/Users/<username>/.ssh/id_rsa': Connection closed by 2406: da00: ff00 :: 22cd: e0db port 22
Answer # 1
If it fails from the debug log, it seems that you are connected with IPv6, but if you specify IPv4 in the ssh settings, can you connect?
If you want to connect with IPv4 only, add it to ssh configuration file
Host bitbucket.org HostName bitbucket.org AddressFamily inet
Set as follows.
If AddressFamily is inet6, only IPv6 is used.
- linux - git clone connection times out
- clone fails with tortoisegit from subversion
- git - causes of ssh connection failure
- git - i can't set up a system that collects several user's responses and responds to one channel in the form of a code box in di
- linux - git pull fails with permissions
- windows 10 - internet connection fails at necafe
- C # loop judgment implementation code will come in several times
- Several configuration methods of Java database connection pool (Take MySQL database as an example)
- Python automated test connection to several sets of test package examples
- python - connection to db fails
- ssh connection times out
- unable to ssh connection to gitlab (gitlab ce) using sourcetree
- git - unauthorized fatal: could not read from remote repository
- ruby on rails - i talked to bitbucket in chapter 1 of the rails tutorial please lend someone help
- git - i want to terminate the propagated ssh-agentexe process
- how to link github with ssh from xcode
- ruby on rails - rails tutorial 75 で き な い can not push to repository
- about the origin of the git-flow branch
- linux - cannot push from lightail to bitbucket
- ruby on rails - i want to set an ssh key
- ruby - rails tutorial 1-4-3 cannot push source code to bitbucket
- how can i display git branch!