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

Next challenges

Recent achievements

  • Global
  • Personal

Recognition

  • Give kudos
  • Received
  • Given

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

could not read from remote repository

Hi,

I am going today through connectivity problems to my bitbucket repositories. It does not seem a client issue as I can reproduce the same problem in my two machines. Neither an internet connection problem on my side, as I can reproduce through two different networks (home connection and cell phone tethering).

The sympthoms are as follow:

$ git pull
Enter passphrase for key '/home/roberto/.ssh/id_bitbucket':
Connection to bitbucket.org closed by remote host.
fatal: Could not read from remote repository.

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

Same exact message in both machines. I have tried the following also:

$ ssh -v git@bitbucket.org
OpenSSH_7.6p1 Ubuntu-4ubuntu0.1, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/roberto/.ssh/config
debug1: /home/roberto/.ssh/config line 1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to bitbucket.org [18.205.93.2] port 22.
debug1: Connection established.
debug1: identity file /home/roberto/.ssh/id_bitbucket type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/roberto/.ssh/id_bitbucket-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version conker_1.1.17-9953920 app-130
debug1: no match: conker_1.1.17-9953920 app-130
debug1: Authenticating to bitbucket.org:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com 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 /home/roberto/.ssh/known_hosts:31
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:KwjrafCTA0P4mDiNqNztGEmmYkpdcGN633rHnL81AEM /home/roberto/.ssh/id_bitbucket
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.205.93.2]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_MEASUREMENT = es_ES.UTF-8
debug1: Sending env LC_PAPER = es_ES.UTF-8
debug1: Sending env LC_MONETARY = es_ES.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_NAME = es_ES.UTF-8
debug1: Sending env LC_ADDRESS = es_ES.UTF-8
debug1: Sending env LC_NUMERIC = es_ES.UTF-8
debug1: Sending env LC_TELEPHONE = es_ES.UTF-8
debug1: Sending env LC_IDENTIFICATION = es_ES.UTF-8
debug1: Sending env LC_TIME = es_ES.UTF-8
debug1: channel 0: free: client-session, nchannels 1
Connection to bitbucket.org closed by remote host.
Connection to bitbucket.org closed.
Transferred: sent 3468, received 1640 bytes, in 20.1 seconds
Bytes per second: sent 172.4, received 81.5
debug1: Exit status -1

I do not know how to continue from this point. Any hints?

Thanks in advance.

18 answers

2 accepted

6 votes
Answer accepted

Today this problem just disappeared from all my devices. I am able to pull, push, clone, etc. without problem. Flush! Server side problem + fix, I guess. That's fine.

BUT

How does Atlassian ever want to make the community engaged with their products with such service bumps? Two weeks! I even had to create a git server at home to be able to continue work. I am sure that I was not the only one with this problem, my setup is simple (standard git + openssh).

The worst part was the feeling that nobody really cared about this issue. That I would not even be able to clone my git repos (and maybe move somewhere else).

Thank you for the fix, but my trust on bitbucket has got much weaker after this issue.

I'm facing a similar issue, since days :(

I'm working now with newly generated ssh-keys

Like # people like this

I’m having the same problem right now, also for days.  I was working along just fine with my repository.  A little more than a week ago, it stopped working.  I got a notice from Atlassian that bitbucket was having problems.  The next day, my repository was working fine again.  A couple days after that, it stopped working again (no notice this time).  It’s been several days now, and I still can’t write to [edit: or read from] my repository.

As robertolo surmised, this is probably a server side error.

Mark

 

Update:  I did as Scott Dudley _Cenote_ suggested (below) and installed new SSH keys.  This did not solve the problem.  However, in troubleshooting, I did discover that the command

ssh -T git@bitbucket.org

Produced the error “Connection closed by [IP address] port 22” whenever I was connected to my VPN (specifically, NordVPN).  When I was not connected to my VPN, the command produced the expected output indicating I was logged in by my username.  Thus, I can conclude my SSH keys are now working properly.

However, attempts to push my code updates, even when my VPN is disconnected, produce the error message, “Connection to bitbucket.org closed by remote host.  fatal: the remote end hung up unexpectedly”

I’ll keep updating here until resolved.

3 votes
Answer accepted

At least in the situation where there is a "broken pipe" error message like this:

Cloning into 'reponame'...
packet_write_wait: Connection to a.b.c.d port 7089: Broken pipe
fatal: Could not read from remote repository.

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

I was able to get this to work by adding the following to the ~/.ssh/config file on the client machine:

IPQoS=throughput

For what it is worth, the client was a VM guest. For some of the other people that experienced issues only when using/not using a VPN, maybe this might be relevant too.

Thanks! I'm in a VM too. This worked for me:

export GIT_SSH_COMMAND="ssh -o IPQoS=throughput -i /home/USERNAME/.ssh/id_rsa_bitbucket"
git clone ssh://USERNAME@bitbucket.org/WORKSPACE/REPO.git

This happens because the SSH key needs to be addressed to the user account, not the repository itself.

This is the solution!

Like # people like this

🔥️Cooking with gas🔥️

This was not the solution, this was checked from minute 1

Like d_nadkin likes this

Don't think this is the issue.  `ssh -Tv git@bitbucket.org` show that SSH Auth actually works.  Something else is preventing further communication.

I made this screenshot for a collaborator.  This is really easy to do incorrectly. I'd argue the "incorrect" path is easier and more in your face when you create a new repository than the "correct" location. Hope this helps someone.

Screen Shot 2019-11-13 at 9.16.07 AM.png

Like # people like this

Not. As @mkochco is pointing out, SSH authentication is actually working. It is something else which causes this error.

Thank you @umassthrower !!!

I literally searched for hours to solve this problem and you gave an incredibly detailed visual guide on how to resolve the problem. It's specific to the UI of this platform and I'm not sure why this has not been addressed, but thank you so much for your contribution!

Like fernando_avila likes this

Thank you. FYI: adding the key to repository works in read mode, i was able to pull changes, but wasn't able to push

Like Nestsiarovich likes this

Foi a solução perfeita, a chave ser informada no meu perfil e não no repositório.

I resolved with this simple trick 

  1. Remove the SSH key from the repo. (Click on repo name > Settings > Access Keys)
  2. Add SSH key to Account settings SSH keys. (Click on your avatar > Bitbucket Settings > SSH Keys)

(found on StackOverflow: https://stackoverflow.com/questions/56828685/cant-git-push-to-bitbucket-unauthorized-fatal-could-not-read-from-remote-re/56828686#56828686).

@Marcello Verona Thank you very much! Your answer solved my read-only error when trying to push to my bitbucket repo. I did infact save my public key in my repo's "Access key" setting, rather than my bitbucket account's "SSH key" settings. Deleting the key from the Access key and pasting it to SSH key settings resolved this issue.

This works like a charm !!!

Thanks a lot. This answer should be pin on top of the thread.

unfortunately, in my case the problem persists with *no* keys on the repo but keys on the account; in fact the repo never had keys at all.

God damn! This solve my issue stucking me for half day!

Works like a charm!


5 votes
Ana Retamal Atlassian Team Jan 18, 2019

Hi Roberto!

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 it's associated to the right Bitbucket account by running:

ssh -Tv git@bitbucket.org

If all the above seems to be ok, can you try to pull over https instead of ssh and tell us if you till get an error?

Let us know!
Ana

Worked for me! Thanks!

So this command

ssh -Tv git@bitbucket.org

Gives me:

logged in as benwinding

But trying to pull a repository, gives me

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

 Any ideas?...

Like ivol likes this

I deleted the old keys and readded a new SSH key, now it works???

I am still facing the issue.

I  run the commands which you mentioned above and i am able to add the keys to SSH agent but still getting below error. while i am pushing the code.

 

fatal: Could not read from remote repository.

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

This worked for me. Thank you.

Thanks Ana! Lots of love for you!

FYI the ssh -T command mentioned here is misleading!

As long as you have an ssh key configured on your Bitbucket account https://bitbucket.org/account/settings/ssh-keys/, the following command will report success, no matter the key that you're using to connect to BitBucket

$ ssh -Tv git@bitbucket.org
...
...
debug1: Authentication succeeded (publickey)
...
...

I tried two different ~/.ssh/config configurations to verify this. One with the actual key that I have configured in https://bitbucket.org/account/settings/ssh-keys/

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa_bitbucket

The ssh command returns "Authentication succeeded" and error code 0.

Then I changed the BitBucket section in my ~/.ssh/config to use a key that exists on my file system, but is not configured here https://bitbucket.org/account/settings/ssh-keys/

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa

...and the ssh command still returns "Authentication succeeded" and error code 0.

¯\_(ツ)_/¯

I don't have an answer but I'm having the exact same issue. I can fetch from a Bitbucket repo from my office network, but when I get home I get the same error as reported. 

fatal: Could not read from remote repository.
Please make sure you have the correct access rights


Running `ssh -Tv git@bitbucket.org` I can confirm that succeeds from the following

debug1: Authentication succeeded (publickey).

Authenticated to bitbucket.org ([2406:da00:ff00::6b17:d1f5]:22).

Super mysterious. I use the same SSH keys on GitHub just fine from home and office so my SSH client is working. 

macOS 10.14.5

git version 2.22.0

openssl: stable 1.0.2s (bottled) [keg-only]

ssh -V reports "OpenSSH_7.9p1, LibreSSL 2.7.3"

 

 

Me too experiencing this issue now.

2 weeks ago everything worked, now it's broken. What the hell?
Didn't change my keys, debug recognizes me correctly, yet i still can't pull or push to same repository i worked with 2 weeks ago!

a2Xn1ahw5aw4rg

Has this been solved yet Atlassian ? - this is a really hard to troubleshoot problem.

The SSH connection is fine, nothing is wrong with the keys (it accepts public key auth), please tell us why this is failing.

I guess they know from the beginning, from time to time they have such service (long) hiccups.

My original question dates from over a year ago.

Apparently they just do not give a shit about free tier users. They don't realize that these free tier users could potentially become paying customers, and they are just building a very bad reputation.

The thing is - this doesn't just affect free tier users - this is effecting a bitbucket DC user.

Like robertolo likes this

look at mkochco answer further down this thread - may work for you

We experienced this issue and finally tracked it down to an issue with IP QoS settings.  I don't think this has anything to do with Bitbucket.  Instead it has everything to do with the route you take to Bitbucket and how the default SSH client IP QoS exposes issues with certain network equipment.  We worked around the issues by adding the following to `/etc/sshd/ssh_config`

Host *
IPQoS 0x00

Very good, thanks - first reasonable answer in the whole thread. Unfortunately I cannot check this any more, I hope this could help others.

I have read somewhere else, that `IPQoS=throughput` can be also helpful.

Like philmill likes this

Thank you, this solves my problem.

This also resolved my problem. Thanks @mkochco

This worked for me:

~/.ssh/config

 

Host bitbucket.org
Hostname bitbucket.org
User git
IdentityFile ~/.ssh/bitbucket_id_rsa
IdentitiesOnly yes

This is what worked for me as it bypassed my agent forwarding and forced me to have the key local to the box.  Not ideal, but it worked.

Worked for me!

Thank you!

Ah finally, after days of struggling with this issue, this solution works. Thank you!

Same problem here

Authenticated to bitbucket.org ([18.205.93.2]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: channel 0: free: client-session, nchannels 1
Connection to bitbucket.org closed by remote host.
Transferred: sent 2520, received 1580 bytes, in 0.0 seconds
Bytes per second: sent 53653025.8, received 33639595.5
debug1: Exit status -1

Same problem!

```
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.234.32.155]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LANG = ru_RU.UTF-8
debug1: Sending env LC_CTYPE = UTF-8
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2772, received 1640 bytes, in 10.1 seconds
Bytes per second: sent 273.6, received 161.9
debug1: Exit status -1
```

When I use VPN - all OK. What the problem?

Retring ssh -Tv git@bitbucket.org to another IP from list:

$ host bitbucket.org
bitbucket.org has address 18.234.32.157
bitbucket.org has address 18.234.32.156
bitbucket.org has address 18.234.32.155

with another result:

----

debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.234.32.157]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LANG = ru_RU.UTF-8
debug1: Sending env LC_CTYPE = UTF-8
logged in as eagleas

You can use git or hg to connect to Bitbucket. Shell access is disabled
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2772, received 1832 bytes, in 0.3 seconds
Bytes per second: sent 10890.2, received 7197.3
debug1: Exit status 0
----

debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.234.32.156]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LANG = ru_RU.UTF-8
debug1: Sending env LC_CTYPE = UTF-8
debug1: client_input_channel_req: channel 0 rtype exit-status reply 0
logged in as eagleas

You can use git or hg to connect to Bitbucket. Shell access is disabled
debug1: channel 0: free: client-session, nchannels 1
Transferred: sent 2772, received 1832 bytes, in 0.3 seconds
Bytes per second: sent 10967.8, received 7248.6
debug1: Exit status 0

----


and again .155:

debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.234.32.155]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_ALL = en_US.UTF-8
debug1: Sending env LANG = ru_RU.UTF-8
debug1: Sending env LC_CTYPE = UTF-8
packet_write_wait: Connection to 18.234.32.155 port 22: Broken pipe


It seems to me - problem with server on IP: 18.234.32.155. Please, look into this.
This problem exists for a long time.

Like # people like this

Wow you're right. I have had the same problem for months
https://community.atlassian.com/t5/Git-questions/Unable-to-access-repo-via-SSH-fatal-Could-not-read-from-remote/qaq-p/1075122

As soon as I connect to VPN, git ls-remote suddenly succeeds

Same issue today Tues Nov 5.  Hey Atlassian why is this happening?

If VPN's work, does this mean it could be geolocation-based?

Some IP Adresses could be refused based on their location :sad

Hi Ana, thanks for your answer,

The ssh key seems to be correctly added to the ssh agent, but still bitbucket.org is kicking me out without any further explanation...

$ ssh-add -L
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQ ... WwksXHHvXIFbIp /home/roberto/.ssh/id_bitbucket


$ cat ~/.ssh/config
Host bitbucket.org
HostName bitbucket.org
PreferredAuthentications publickey
IdentityFile ~/.ssh/id_bitbucket


$ ssh -Tv git@bitbucket.org
OpenSSH_7.6p1 Ubuntu-4ubuntu0.1, OpenSSL 1.0.2n 7 Dec 2017
debug1: Reading configuration data /home/roberto/.ssh/config
debug1: /home/roberto/.ssh/config line 1: Applying options for bitbucket.org
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: Applying options for *
debug1: Connecting to bitbucket.org [18.205.93.1] port 22.
debug1: Connection established.
debug1: identity file /home/roberto/.ssh/id_bitbucket type 0
debug1: key_load_public: No such file or directory
debug1: identity file /home/roberto/.ssh/id_bitbucket-cert type -1
debug1: Local version string SSH-2.0-OpenSSH_7.6p1 Ubuntu-4ubuntu0.1
debug1: Remote protocol version 2.0, remote software version conker_1.1.17-9953920 app-155
debug1: no match: conker_1.1.17-9953920 app-155
debug1: Authenticating to bitbucket.org:22 as 'git'
debug1: SSH2_MSG_KEXINIT sent
debug1: SSH2_MSG_KEXINIT received
debug1: kex: algorithm: curve25519-sha256@libssh.org
debug1: kex: host key algorithm: ssh-rsa
debug1: kex: server->client cipher: chacha20-poly1305@openssh.com MAC: <implicit> compression: none
debug1: kex: client->server cipher: chacha20-poly1305@openssh.com 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 /home/roberto/.ssh/known_hosts:31
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:KwjrafCTA0P4mDiNqNztGEmmYkpdcGN633rHnL81AEM /home/roberto/.ssh/id_bitbucket
debug1: Server accepts key: pkalg ssh-rsa blen 279
debug1: Authentication succeeded (publickey).
Authenticated to bitbucket.org ([18.205.93.1]:22).
debug1: channel 0: new [client-session]
debug1: Entering interactive session.
debug1: pledge: network
debug1: Sending environment.
debug1: Sending env LC_MEASUREMENT = es_ES.UTF-8
debug1: Sending env LC_PAPER = es_ES.UTF-8
debug1: Sending env LC_MONETARY = es_ES.UTF-8
debug1: Sending env LANG = en_US.UTF-8
debug1: Sending env LC_NAME = es_ES.UTF-8
debug1: Sending env LC_ADDRESS = es_ES.UTF-8
debug1: Sending env LC_NUMERIC = es_ES.UTF-8
debug1: Sending env LC_TELEPHONE = es_ES.UTF-8
debug1: Sending env LC_IDENTIFICATION = es_ES.UTF-8
debug1: Sending env LC_TIME = es_ES.UTF-8
debug1: channel 0: free: client-session, nchannels 1
Connection to bitbucket.org closed by remote host.
Transferred: sent 3136, received 1640 bytes, in 20.5 seconds
Bytes per second: sent 153.2, received 80.1
debug1: Exit status -1


$ git pull
Connection to bitbucket.org closed by remote host.
fatal: Could not read from remote repository.

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

 Also, the SSH key seems to be already included in my bitbucket.org settings...

Untitled.png

 

This really happened from one day to the next one. All repositories which I had been using since years ago, suddenly became unreachable without me touching the ssh config at all (in my two computers at the same time). Do you have any further idea? Thanks :-)

Regards,

Roberto

Ana Retamal Atlassian Team Jan 31, 2019

Hi Roberto,

Did you use sudo? This is a very common mistake and is explained here.

If that's not your case:

  1. Did you already navigate to your repo directory before the pull?
  2. For troubleshooting purposes, have you tried HTTPS instead of SSH?
  3. Can you confirm you have the right permissions for the repo you're trying to pull?

Let us know!

Ana

Hola Ana,

Thank you for your answer. Some post-mortem answers:

  • sudo: not.
  • Yes, I had cloned/pulled/pushed to all these repositories before the incident.
  • I really cannot remember if I tried HTTPS, I guess I did. 2 weeks of downtime and desperation are enough to try many options.
  • Yes, I had the right permissions. I am the owner, basically. I double checked that my SSH key was properly set up here and in server, as you can see in the logs above ("debug1: Authentication succeeded (publickey)").

Luckily now my repos are back to normal as I posted before.

Kind regards,

Roberto

Like sergii_shapovalenko likes this

Actually I was having this problem on a Mac, after trying some solutions I just restarted the computer and BANNG... it worked fine again!

this is still going on. ssh keys are installed in the user profile. i can pull but not push, same mysterious error message.

This is really confusing when I have multiple project in github, bitbucket's different accounts.

I removed the SSH key from repo, but add SSH key into the account bucket setting, then it works fine.

0 votes

I've multiple routers in my house. When i switched the WIFI to the new one, git wont push and gives me this error, but when connected to the old WIFI, and it works. Weird!

Platform : git bash - windows 10

I had the exact same problem, and after reading through this entire thread, none of the solutions offered here did it for me. After lots of trial and error, I found the solution for me

I have the public ssh key that I want to use with BitBucket configured on my bitbucket.org account page https://bitbucket.org/account/settings/ssh-keys/

The version of my ~/.ssh/config file that didn't work for me looked like this

Host *
IdentityFile ~/.ssh/id_rsa
IdentitiesOnly yes
UseKeychain yes
AddKeysToAgent yes
Compression yes
StrictHostKeyChecking no
ForwardAgent yes
ForwardX11 no
ServerAliveInterval 600

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa_bitbucket

so I have one key that I want to use as default (~/.ssh/id_rsa configured in "Host *" section) and another that I want to use with BitBucket (~/.ssh/id_rsa_bitbucket configured in "Host bitbucket.org" section)

While this setup is working with any other site I need to use git or ssh with (e.g. github.com), it doesn't with Bitbucket. So removing the first default key (~/.ssh/id_rsa configured in "Host *" section) did the trick. The working ~/.ssh/config file now looks like this

Host *
IdentitiesOnly yes
UseKeychain yes
AddKeysToAgent yes
Compression yes
StrictHostKeyChecking no
ForwardAgent yes
ForwardX11 no
ServerAliveInterval 600

Host bitbucket.org
HostName bitbucket.org
User git
IdentityFile ~/.ssh/id_rsa_bitbucket

 

Suggest an answer

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

Calling any interview participants for Bitbucket Data Center

Hi everyone,  We are looking to learn more about development teams’ workflows and pain points, especially around DevOps, integrations, administration, scale, security, and the related challeng...

471 views 5 4
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