Bitbucket known hosts fetch fails ssh request

Hey, I'm usingn AWS EC2 with security groups defined to allow requests from remote machines to my server.

While trying to fetch my server fingerprint in known hosts section, I receive an error saying that the SSH request fails. This is probably caused by my server not allowing the request.

I've tried adding api.bitbucket.org IP addresses defined here: https://confluence.atlassian.com/bitbucket/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall-343343385.html but the SSH request still fails.

What IP address does bitbucket use to make this request?

Thanks in advanced.

1 answer

1 accepted

0 vote

Hello @Imri Barr,

Is it failing due to IP address or port number?

I receive an error saying that the SSH request fails.

What is the error you are receiving? Could you please enable DEBUG and provide output so we can help you out?

# Windows
set GIT_TRACE_PACKET=1 set GIT_TRACE=1 set GIT_CURL_VERBOSE=1
git clone ....
# Linux or GitBash
export GIT_TRACE_PACKET=1 export GIT_TRACE=1 export GIT_CURL_VERBOSE=1
git clone ....

Are you able to SSH to Bitbucket?

ssh -v bitbucket.org

Kind regards,

Rafael

Hello @Imri Barr,

in What IP address does bitbucket use to make this request?

Bitbucket uses a range of ip addresses, as per mentioned in https://confluence.atlassian.com/pages/viewpage.action?pageId=847452940, so you are required to whitelist them.

Kind regards,

Rafael

Which ones of the IP list ranges should I use? I currently only inserted the api.bitbucket.com IP addresses.

Hello @Imri Barr,

Valid IP addresses for Bitbucket Pipelines services

You can use this IP range to whitelist requests made by Bitbucket Pipelines services (not your build environments) to external systems such as performing an SSH fingerprint lookup. Note that this IP range may also be used by other Atlassian systems in addition to Bitbucket Pipelines.

IPv4 Outbound

104.192.136.0/21

Kind regards,

Rafael

This is the IP I was looking for!

Thank you very much!

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jun 12, 2018 in Bitbucket

Do you use any Atlassian products for your personal projects?

After spinning my wheels trying to get organized enough to write a book for National Novel Writing Month (NaNoWriMo) I took my affinity for Atlassian products from my work life and decided to tr...

24,006 views 26 12
Join discussion

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you