You're on your way to the next level! Join the Kudos program to earn points and save your progress.
Level 1: Seed
25 / 150 points
1 badge earned
Challenges come and go, but your rewards stay with you. Do more to earn more!
What goes around comes around! Share the love by gifting kudos to your peers.
Keep earning points to reach the top of the leaderboard. It resets every quarter so you always have a chance!
Join now to unlock these features and more
I've been using the bitbucket-build-statistics pipe as useful way to keep track of build minute usage. Recently IP whitelisting was introduced and since this point I am having issues running the pipe due to access errors. For example this can be seen in a log excerpt:
Status: Downloaded newer image for bitbucketpipelines/bitbucket-build-statistics:1.4.0
DEBUG: Starting new HTTPS connection (1): bitbucket.org:443
DEBUG: https://bitbucket.org:443 "GET /bitbucketpipelines/official-pipes/raw/master/pipes.prod.json HTTP/1.1" 200 None
INFO: Executing the pipe...
INFO: Bitbucket workspace: xxxx
INFO: Bitbucket repository list: xxxx/yyyy
INFO: File Name: build_usage_10_29_2023_484.txt
INFO: Output file format: table
INFO: Build days: 30
INFO: Debug: True
DEBUG: Starting new HTTPS connection (1): api.bitbucket.org:443
DEBUG: https://api.bitbucket.org:443 "GET /2.0/repositories/xxxx/yyyy/pipelines/?sort=-created_on&page=1&pagelen=100 HTTP/1.1" 403 102
✖ 403 Client Error: Forbidden for url: https://api.bitbucket.org/2.0/repositories/xxxx/yyyy/pipelines/?sort=-created_on&page=1&pagelen=100
I had been using an access token (and setting BITBUCKET_ACCESS_TOKEN appropriately) successfully until the point where IP whitelisting was implementated, however I now encounter http 403 forbidden errors when running the pipe (as per above logs).
Does anyone have any advice on alternate configurations that may work when IP whitelisting is applied?
Perhaps it a satisfactory approach would be to apply the trusted Bitbucket Cloud IP addresses as discussed here -> https://support.atlassian.com/bitbucket-cloud/docs/what-are-the-bitbucket-cloud-ip-addresses-i-should-use-to-configure-my-corporate-firewall/ ?
Any advice greatly appreciated.
G'day @Tim Apps
You'll be required to allow the following IPs for API requests if you have the IP Allowlisting feature enabled:
Once added, this should no longer block your build statistic pipe request as it uses API requests.
Hey @Syahrul , we seem to still be encountering an issue with these pipelines, we have whitelisted the suggested IP how ever are still encountering the below error messages.
+ git archive -o licence.tar --email@example.com:xxxx/xx-docker.git HEAD bin/yyyy/license/yyyy2.lic
Warning: Permanently added the ECDSA host key for IP address '188.8.131.52' to the list of known hosts.
To access this repository, an admin must whitelist your IP.
fatal: the remote end hung up unexpectedly
As well as the original one in this Thread in two of these pipelines
unsure what IP its asking to be whitelisted but 184.108.40.206/25 should cover 220.127.116.11 range wise.
do you have any other suggested IP's that should be whitelisted or a way to debug the IP that is being rejected?