You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Support GITHUB_TOKEN env var for GitHub API requests to avoid rate limiting (403) #281
When the Java extension fetches Lombok version tags from GitHub, it makes unauthenticated requests to https://api.github.com/repos/projectlombok/lombok/tags. This is subject to GitHub unauthenticated rate limit of 60 requests per hour per IP.
In shared network environments (corporate NAT, VPN, etc.), this limit is easily hit, causing jdtls to fail with:
Language server jdtls: Failed to get Lombok jar path: Failed to fetch Lombok versions from projectlombok/lombok: Failed to fetch GitHub tags: failed to fetch https://api.github.com/repos/projectlombok/lombok/tags: status code 403 Forbidden
Even when users set GITHUB_TOKEN in their environment, this function does not read it, so the request always goes unauthenticated (limit: 60/hr instead of 5000/hr).
Proposed Solution
Read the GITHUB_TOKEN environment variable and include it as an Authorization header when making GitHub API requests:
Activity
fix: support GITHUB_TOKEN env var and fallback to local on fetch failure
fix: support GITHUB_TOKEN env var and fallback to local on fetch failure
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads
Support GITHUB_TOKEN and graceful fallback for JDTLS/Lombok downloads