Problem
When making an API call from a Python notebook to GitHub to fetch issues, you receive a 403 Forbidden
error.
Cause
The GitHub organization has an IP allow list enabled. This setting restricts access from Databricks workspace IP addresses.
Solution
Disable the IP allow list in GitHub.
- In GitHub, navigate to your organization.
- Click on the Settings tab.
- Under Security, select Security settings.
- Scroll down to the IP allowlist section. This is where you manage the allowed IP addresses for your organization.
- Click the Disable IP allowlist option.
If your security policies require the IP allow list to be enabled, add the Databricks Control Plane NAT IP to the IP allowlist. This will allow traffic from Databricks to access the GitHub API without being blocked.
For more information, refer to the GitHub Managing allowed IP addresses for your organization documentation.