Troubleshoot GitHub data source issues
This document provides solutions to common issues you may encounter when configuring or using the GitHub data source. For configuration instructions, refer to Configure the GitHub data source.
Authentication errors
These errors occur when credentials are invalid, missing, or don’t have the required permissions.
“401 Unauthorized. Check your API key/Access token”
Symptoms:
- Save & test fails with a 401 error.
- Queries return authorization errors.
- Resources don’t load in drop-downs.
Possible causes and solutions:
GitHub App authentication fails
Symptoms:
- Save & test fails when using GitHub App authentication.
- Queries return errors about invalid credentials.
Possible causes and solutions:
Can’t access private repositories or organizations
Symptoms:
- Queries only return data from public repositories.
- Organization-level queries return empty results.
Solutions:
- Verify your personal access token includes the
repoandread:orgscopes. - For GitHub Apps, verify the app is installed on the organization and has the required repository permissions.
- Generate a new token or update the app permissions and reconfigure the data source.
Connection errors
These errors occur when Grafana can’t reach the GitHub API endpoints.
“404 Not Found. Check the Github Enterprise Server URL”
Symptoms:
- Save & test fails with a 404 error when using GitHub Enterprise Server.
Solutions:
- Verify the GitHub Enterprise Server URL is correct and includes the protocol (for example,
https://github.example.com). - Ensure the URL doesn’t include a trailing path like
/api/v3– the plugin adds this automatically. - Verify the GitHub Enterprise Server instance is accessible from the Grafana server.
“Unable to reach the Github Enterprise Server URL from the Grafana server”
Symptoms:
- Save & test fails with a connection error.
- DNS resolution or network timeout errors appear in Grafana logs.
Solutions:
- Verify network connectivity from the Grafana server to the GitHub Enterprise Server.
- Check that firewall rules allow outbound HTTPS (port 443) traffic to the GitHub endpoint.
- Verify proxy settings if your Grafana server uses a proxy for outbound requests.
- For Grafana Cloud, configure Private data source connect if your GitHub Enterprise Server is in a private network.
Query errors
These errors occur when executing queries against the data source.
No data or empty results
Symptoms:
- Query executes without error but returns no data.
- Charts show “No data” message.
Possible causes and solutions:
Result limits
Some query types have maximum result limits:
If you’re hitting these limits, use more specific query filters or narrow the time range to reduce the result set.
Rate limiting
Symptoms:
- Queries intermittently fail or return errors.
- Multiple panels on a dashboard fail to load simultaneously.
Solutions:
The plugin caches all API responses for up to five minutes to reduce the number of requests to GitHub. If you’re still hitting rate limits:
- Reduce the frequency of dashboard auto-refresh.
- Use more specific queries to reduce the number of API calls.
- If using a personal access token, consider switching to a GitHub App, which has higher rate limits.
- For Grafana Enterprise or Grafana Cloud, enable query caching for additional caching control beyond the built-in cache.
Code scanning errors
Code scanning alerts return empty results
Symptoms:
- Code scanning queries return no data even though alerts exist in GitHub.
Solutions:
- Verify the token or GitHub App has the code scanning permissions:
code scanning alerts: read-onlyandsecurity_events: read-only. - Verify code scanning is enabled on the repository.
- If querying at the organization level, leave the Repository field empty.
Enable debug logging
To capture detailed error information for troubleshooting:
Set the Grafana log level to
debugin the configuration file:[log] level = debugRestart Grafana for the change to take effect.
Reproduce the issue and review logs in
/var/log/grafana/grafana.log(or your configured log location).Look for entries containing
githubfor request and response details.Reset the log level to
infoafter troubleshooting to avoid excessive log volume.
Get additional help
If you’ve tried the solutions in this document and still have issues:
- Check the Grafana community forums for similar issues.
- Review the GitHub data source plugin issues for known bugs.
- Consult the GitHub API documentation for service-specific guidance.
- Contact Grafana Support if you’re a Grafana Cloud Pro, Cloud Advanced, or Enterprise customer.
- When reporting issues, include:
- Grafana version and plugin version.
- Exact error messages (redact sensitive information).
- Steps to reproduce the issue.
- Relevant configuration details (redact credentials).


