Error "403" when accessing GitHub APIs from Bitbucket Pipelines

Platform Notice: Cloud Only - This article only applies to Atlassian products on the cloud platform.

Summary

When attempting to access GitHub APIs from Bitbucket Pipelines, one may encounter "403" errors. An example of this can be seen below, where an attempt to update a Helm project failed with the following error:

1 Could not retrieve the latest release tag information from https://api.github.com/repos/helm/helm/releases/latest: curl: (22) The requested URL returned error: 403 Failed to install Helm

Solution

GitHub has implemented rate limiting for their API calls to ensure fair usage. The rate limits for GitHub API calls are as follows:

  1. User Access Token Requests are limited to 5,000 requests per hour.

  2. User Access Token Requests have a higher limit of 15,000 for enterprise customers.

  3. For unauthenticated requests, the rate limit allows for up to 60 requests per hour. Unauthenticated requests are associated with the originating IP address, not the person making requests.

In cases where API requests are being made without authentication, there are chances of hitting the rate limit if the request count exceeds 60 within an hour. The recommended solution to avoid rate-limiting issues when accessing GitHub APIs from Bitbucket Pipelines is to authenticate using their tokens. By authenticating with tokens, one can increase the request limit to 5,000 per hour and prevent rate limiting.

Rate limits are subject to change. Please refer to the rate-limiting GitHub documentation for the latest information

Updated on March 5, 2025

Still need help?

The Atlassian Community is here for you.