Forums

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

Bitbucket pipeline ip whitelisting issue

Tagnpin
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!
November 13, 2022

Hi,

I am using the bitbucket pipeline to run our unit test cases.

In my package.json file, I am using the project host on bitbucket with the IP whitelisting enabled security.

I also whitelisted the IP mentioned on the bitbucket portal

IPv4: 18.205.93.0/25, 18.234.32.128/25, and 13.52.5.0/25

IPv6: 2406:da00:ff00::0/96

 

Still getting the error while installing npm packages.

ERROR: npm ERR! remote: To access this repository, an admin must whitelist your IP.

 

PFA for your reference

Screenshot 2022-11-14 at 12.36.20 PM.png

 

1 answer

0 votes
Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 14, 2022

G'day!

I would suggest reading the following documentation for IP addresses that need to be whitelisted - particularly the section "Valid IP addresses for Bitbucket Pipelines build environments" and whitelist these accordingly:
https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/

You can determine the exact IP address for a given build by adding the following to your pipelines YML - this should be a part of the list linked above:

curl http://checkip.amazonaws.com/

Hope this helps.

Cheers!

- Ben (Bitbucket Cloud Support)

Tagnpin
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!
November 15, 2022

Thanks, Ben I have whitelisted entire Valid IP addresses for Bitbucket Pipelines build environments.

Now its working

kritika.gupta
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!
November 18, 2024

Hi Ben, facing the same issue. I have already whitelisted all the IP's mentioned under

"Valid IP addresses for Bitbucket Pipelines build environments"(Total 24) ,  still getting same error while deploying code from bitbucket

Ben
Atlassian Team
Atlassian Team members are employees working across the company in a wide variety of roles.
November 27, 2024

Hi @kritika.gupta 

Please allow me to clarify the situation regarding Bitbucket Cloud IP addresses.

The documentation of Bitbucket Pipelines Cloud IP addresses is divided into two sections:

  • Section 1: Valid IP addresses for Bitbucket Pipelines build environments

    This section applies to 1x/2x step sizes (or 4x/8x steps that have not been explicitly flagged to use atlassian-ip-ranges). An exhaustive list of IP addresses from which the traffic may originate on AWS can be obtained by using the following endpoint. You should filter records where the service equals EC2 or S3, and focus on the us-east-1 and us-west-2 regions. However, we do not recommend using these IP ranges as a security control due to their broad nature.

  • Section 2: Atlassian IP Ranges

    This section pertains to steps specifically configured to use Atlassian IP ranges. These are applicable only to 4x and 8x size steps that have the atlassian-ip-ranges: true flag enabled. The step sizes 4x and 8x are only available for builds running under a paid Bitbucket Cloud plan (Standard or Premium)

To mitigate your issue and use the more restricted set of IPs, I suggest adjusting your pipeline configuration to include the following:

pipelines:
  default:
    - step:
       size: 4x
       runtime:
         cloud:
           atlassian-ip-ranges: true
       script:
          - echo "This step will use atlassian-ip-ranges"

You can find more details in the documentation here: Runtime Step Options.

This configuration improves security by restricting the IP addresses utilized by Pipelines builds to the Atlassian IP ranges.

If you still encounter issues, we would need to inspect your pipelines environment to investigate this further.

Please raise a ticket with our support team using your Premium company workspace URL so we may do so, as our system requires a support ticket to allow us to grant ourselves the necessary access to check this:

If you have issues raising a ticket, please let me know your timezone and we can raise one on your behalf.

Cheers!

- Ben (Bitbucket Cloud Support)

Suggest an answer

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

Atlassian Community Events