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

bitbucket connect get stuck or timeout

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!
September 13, 2023

I often encounter connectivity issues when fetching repositories from Bitbucket. The connection often gets stuck and requires multiple retries, with a failure rate exceeding 50%. When a successful connection is made, I receive the message:

**Warning: Permanently added ',' (ECDSA) to the list of known hosts.**

However, when the connection fails, no error message is displayed, and it remains stuck indefinitely. This issue significantly impacts my work, and I'm experiencing quite a bit of frustration.

Scenario 1: I encounter this issue when performing Git operations, such as git pull origin test.

Scenario 2: I face this problem when running Ansible to fetch repositories from Bitbucket. I need to fetch four repositories in succession, which makes it prone to failures, ultimately preventing me from executing my tasks.

SSH Configuration:

My SSH configuration for Bitbucket is as follows:

bashCopy code
  AddKeysToAgent yes
  IdentityFile ~/.ssh/bitbucket_work

Validation Files:

I have both and bitbucket_work as relevant authentication files.

I have also executed ssh -Tv, and sometimes it succeeds, while other times it gets stuck at the following point:

OpenSSH_8.2p1 Ubuntu-4ubuntu0.5, OpenSSL 1.1.1f  31 Mar 2020
debug1: Reading configuration data /home/allen/.ssh/config
debug1: Reading configuration data /home/allen/.ssh/kapitoai/config
debug1: /home/allen/.ssh/config line 3: Applying options for
debug1: Reading configuration data /etc/ssh/ssh_config
debug1: /etc/ssh/ssh_config line 19: include /etc/ssh/ssh_config.d/*.conf matched no files
debug1: /etc/ssh/ssh_config line 21: Applying options for *
debug1: Connecting to [] port 22.

Your assistance in resolving this matter would be greatly appreciated. Thank you.

1 answer

1 accepted

1 vote
Answer accepted
Patrik S
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
September 14, 2023

Hello @allen and welcome to the Community!

From the looks of it, it sounds like a DNS resolution issue as the IP address the debug log is showing when you mentioned it failed and got stuck is not a Valid IP address.

In this case, I would suggest changing your DNS to a different one and check if there's any improvement. You can try using Google's DNS 

Alternatively, you can temporarily change your machine's host file to force the resolution of to a fixed address. For this, you will need to edit the /etc/hosts file and include the following entry :

Although we don't expect that IP to be changed, it's safer to let your DNS server resolve the IP address, but forcing it on the hosts file might be a temporary solution.

Thank you, @allen !

Patrik S

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!
September 17, 2023

Thank you for your help!

After making the following changes, although "" still appears, the current connection no longer gets stuck. Here are the actions I took:

sudo vim /etc/hosts

sudo vim /etc/resolv.conf:

sudo vim /etc/wsl.conf:
 generateHosts = false

Do these actions meet expectations? I would like to inquire if there are any missing configurations or additional changes needed.

Suggest an answer

Log in or Sign up to answer
AUG Leaders

Atlassian Community Events