Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Bitbucket pipeline fails because ssh-keyscan is not working as expected

Deleted user February 6, 2023

I have tried all possible combination but still the pipeline. It worked 2 times in between but failed most of the time. I ensured bitbucket IPs are added into the AWS security group. Not sure whats going on.

bit.png

1 answer

0 votes
Theodora Boudale
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
February 7, 2023

Hi @[deleted] and welcome to the community!

If the operation succeeds sometimes but fails other times, I suspect that not all IPs may have been whitelisted.

For requests made from Pipelines build environments, the IP ranges that need to be whitelisted are listed below (section "Valid IP addresses for Bitbucket Pipelines build environments"):

Could you please double-check if all of them have been whitelisted?

Kind regards,
Theodora

Deleted user February 7, 2023

@Theodora Boudale : Yes all the IPs where added in the security group. Infact I printed the public IP before executing the ssh-keyscan.
I noticed that since I am trying to perform ssh to the newly created EC2 machine via the pipeline itself, the machine dns might takes some time to show up. If I add sleep 15s; to the script, it works every time. Tried all sort of possibilities but nothing else works.

Like Vanessa Hoyos Arenas likes this

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
CLOUD
TAGS
AUG Leaders

Atlassian Community Events