Bitbucket Cloud complains "Network is down" and cannot operate commands via ssh
プラットフォームについて: Cloud のみ - この記事は、 クラウド プラットフォームのアトラシアン製品にのみ適用されます。
When you try to operate git/mercurial commands (such as git-clone, git-pull, git-fetch or git-push, etc), Bitbucket responses the error like below even if the repository exists and doesn't have any problem in access rights:
$ git clone firstname.lastname@example.org:<username>/<repository_name>.git Cloning into '<repository_name>'... ssh: connect to host bitbucket.org port 22: Network is down fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
Perform the SSH command below:
ssh -vvvT email@example.com
The expected output includes 2 messages below:
the debug message mentioning "IP_TOS" like as below:
[203.0.113.0]:22 (debug3: ssh_packet_set_tos: set IP_TOS 0x08)
the message telling you could successfully log in:
logged in as <username>.
Otherwise, you can determine the ssh connection may use unsupported protocol, specifically, IPv6. For example, the unexpected output looks like below:
debug1: Reading configuration data /Users/<username>/.ssh/config debug1: /Users/<username>/.ssh/config line 241: Applying options for * debug1: Reading configuration data /etc/ssh/ssh_config debug1: /etc/ssh/ssh_config line 48: Applying options for * debug2: ssh_connect_direct: needpriv 0 debug1: Connecting to bitbucket.org port 22. ssh: connect to host bitbucket.org port 22: Network is down
Bitbucket supports IPv6 for HTTPS connection but not for SSH connection. You should explicitly specify IPv4 to connect to Bitbucket Cloud:
$ ssh -4T firstname.lastname@example.org logged in as <username>. You can use git or hg to connect to Bitbucket. Shell access is disabled.
Edit SSHD configuration file (such as ~/.ssh/config) to enforce IPv4 connection:
Host bitbucket.org AddressFamily inet
The SSH connection via IPv6 isn't actually possible, and we're tracking a suggestion to have this implemented through #16590 - Support IPv6 for SSH connection. Please be advised to add yourself as a watcher to it to receive any updates and add any comments you think are necessary and/or important to the feature request.
We welcome you to refer to our Implementation of New Features Policy which can help you in understanding our practices towards implementation of new features as well as voicing your opinion on the specific matter thus helping raise awareness amongst our Developers.
If you need any assistance from Atlassian or you found any problems related to this knowledge base, please let us know.