Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

ssh_exchange_identification: Connection closed by remote host fatal: Could not read from remote repo

Deleted user January 15, 2019

When trying to initialize a new repo and walk through the instructions on the bitbucket page after opening the terminal through sourcetree.

i continue to get the following error:

ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

I have a publickey made through rsa_id and saved to repo settings. I have read/Write permissions and my global git settings are set.

However, I can still not initialize the repo. One thing is that the port number from bitbucket server tells me a different port number than what is in the URL, I have tried both and neither work.

8 answers

10 votes
Alejandro Rivera
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

I'm started seeing this issue today, this wasn't happening yesterday. :/

 

➜ gpsh (alias to push the current branch to remote)
kex_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository.

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

 

My ssh key is correctly configured, `ssh-add -L` list the right key.

 

```

➜ ssh -Tv git@bitbucket.org
OpenSSH_8.1p1, LibreSSL 2.7.3
debug1: Reading configuration data /Users/username/.ssh/config
debug1: /Users/username/.ssh/config line 1: Applying options for *
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 47: Applying options for *
debug1: Connecting to bitbucket.org port 22.
debug1: Connection established.
debug1: identity file /Users/username/.ssh/id_rsa type 0
debug1: identity file /Users/username/.ssh/id_rsa-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.1
kex_exchange_identification: Connection closed by remote host

```

kayla
Contributor
July 17, 2020

I'm having the same issue this morning for the first time.

Like # people like this
Michael Parsons
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here, something is broken on the bitbucket server.

Like misbach likes this
abhirakshit
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here!

Any solutions?

Like misbach likes this
James Grunewald
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

I also have this issue, starting today on an existing repo.

Like misbach likes this
bargoldi
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here.

Like misbach likes this
Jonathan Guerrero Olivera
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020
Like Prashant Nair likes this
diegodfsd
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

I also have this problem, it was working 1 hour ago :s

Aaron Bell
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here.  Was working as of some hours ago... Now it's not

misbach
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Just started happening for me as well. Help!

prkirby
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Just made an account to add to the noise lol. Same issue for me. 

Like Kuenzang Choden likes this
David Zarruk Valencia
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same for me!

Raghav Sai Cheedalla
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here

Bruce Chamoff July 17, 2020

Same issue.

@AtlassianSupport, what is going on? People have to upload their code. This is frustrating.

Ranjan Shetty
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here

Alejandro Rivera
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
March 11, 2021

Wow, having the same issue and I found this comment, and I cannot recall the time when I posted it.

1 vote
Alexander van Trijffel
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
June 23, 2020

Same issue here.. I get the following output

 

$ ssh -Tv git@bitbucket.org
OpenSSH_8.2p1, OpenSSL 1.1.1f 31 Mar 2020
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: Connecting to bitbucket.org [18.205.93.2] port 22.
debug1: Connection established.
debug1: identity file /c/Users/*snip*/.ssh/id_rsa type 0
debug1: identity file /c/Users/*snip*/.ssh/id_rsa-cert type -1
debug1: identity file /c/Users/*snip*/.ssh/id_dsa type -1
debug1: identity file /c/Users/*snip*/.ssh/id_dsa-cert type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ecdsa type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ecdsa-cert type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ecdsa_sk type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ecdsa_sk-cert type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ed25519 type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ed25519-cert type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ed25519_sk type -1
debug1: identity file /c/Users/*snip*/.ssh/id_ed25519_sk-cert type -1
debug1: identity file /c/Users/*snip*/.ssh/id_xmss type -1
debug1: identity file /c/Users/*snip*/.ssh/id_xmss-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_8.2
kex_exchange_identification: Connection closed by remote host

0 votes
Mushon Nachmani
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
April 25, 2021

Any further update on this?

0 votes
Steve Yegge December 13, 2020

I started having this problem on my mac host after adding a new ssh key for a virtualbox ubuntu guest.

 

My guess is that they are related. No idea how to fix it yet.

 

Edit:  bitbucket.org is down, so this is probably a server-side issue.

0 votes
Rafael de Oliveira
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Same here.

Probably its a temporary problem, because nothing changed in my machine, key is here, all good... well, I will wait a little and see what happens next.

0 votes
Darrel Davis
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 6, 2020

Any further update on this?  I'm having the same issue.

Thanks,

-darrel

0 votes
Luiza COMANESCU
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2019

Hello,

Has this issue been solved? 

Thanks,

Luiza

0 votes
Ana Retamal
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
January 17, 2019

Hi David,

Is your SSH correctly added to your SSH agent? You can check that by running the following command on your terminal:

ssh-add -L

If your key is not there, you can add it by doing:

ssh-add <path_to_key>

If your key is there, you can check if is associated to the right Bitbucket account by running:

ssh -Tv git@bitbucket.org

 

For troubleshooting purposes, have you tried doing this without Sourcetree in the middle? 

Let us know!

Ana

Luiza COMANESCU
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 3, 2019

Hello Ana,

I do have the key. Are there any other suggestions?

Thank you!

Luiza

Like Deleted user likes this
abhirakshit
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
July 17, 2020

Tried this and added successfully. But still the issue persists.

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events