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

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

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

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

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

```

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

Like # people like this

Same here, something is broken on the bitbucket server.

Like misbach likes this

Same here!

Any solutions?

Like misbach likes this

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

Like misbach likes this
Like misbach likes this
Like Prashant Nair likes this

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

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

Just started happening for me as well. Help!

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

Same issue.

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

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

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

Any further update on this?

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.

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.

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

Thanks,

-darrel

Hello,

Has this issue been solved? 

Thanks,

Luiza

0 votes
Ana Retamal Atlassian Team Jan 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

Hello Ana,

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

Thank you!

Luiza

Like Deleted user likes this

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Bitbucket

New improvements to user management in Bitbucket Cloud 👥

Hey Community! We’re willing to wager that quite a few of you not only use Bitbucket, but administer it too. Our team is excited to share that we’ll be releasing improvements throughout this month of...

3,845 views 10 16
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you