Github 429
(For BUA / Add-On Installers)
Section titled “(For BUA / Add-On Installers)”Summary
Section titled “Summary”Some regions—especially parts of South America—may hit strict GitHub rate limits due to shared IP ranges or unstable routing. When this happens, BUA installers or update scripts may show errors like:
API rate limit exceededHTTP 403: ForbiddenHTTP 429: Too Many RequestsThis guide shows you how to raise your GitHub limit from 60 requests/hour → 5,000+ requests/hour, without changing anything that could break your system.
How It Works
Section titled “How It Works”-
BUA scripts use
curlandwgetto fetch files from GitHub. -
GitHub gives unauthenticated users only 60 requests per hour per IP.
-
Shared ISP IPs cause multiple users to hit the same limit.
-
Adding a personal GitHub access token to Batocera’s curl & wget settings:
- Authenticates requests privately
- Raises the limit to 5,000 requests/hour
- Requires no changes to BUA scripts
Step 1 — Create a GitHub Token
Section titled “Step 1 — Create a GitHub Token”-
Click Generate new token (classic)
-
Name:
batocera-bua -
Set expiration (90 days or 1 year)
-
Scopes to enable:
public_repo(optional but recommended)
-
Copy your token (
ghp_xxxxxx...). Keep it private.
Step 2 — Add the Token to curl (Batocera)
Section titled “Step 2 — Add the Token to curl (Batocera)”Create /userdata/system/.curlrc:
cat <<'EOF' > /userdata/system/.curlrcheader = "Authorization: token <YOUR_GITHUB_TOKEN_HERE>"EOF
chmod 600 /userdata/system/.curlrcReplace YOUR_GITHUB_TOKEN_HERE with your actual token.
Verify Everything Works
Section titled “Verify Everything Works”Test 1 — Rate Limit
Section titled “Test 1 — Rate Limit”curl -I https://api.github.com/rate_limitExpected:
x-ratelimit-limit: 5000Test 2 — Raw Download
Section titled “Test 2 — Raw Download”curl -I https://raw.githubusercontent.com/batocera-unofficial-addons/bua/main/install.shShould return 200 OK.
.curlrcand.wgetrcin/userdatasurvive reboots.- Works for all GitHub-related operations in BUA.
- No modifications to BUA codebase required.
Removing the Token
Section titled “Removing the Token”rm /userdata/system/.curlrc /userdata/system/.wgetrcTroubleshooting
Section titled “Troubleshooting”403 even with token? Token expired.
429 Too Many Requests? Temporary burst limit. Retry shortly.
Curl still shows 60 limit? Ensure HOME is /userdata/system:
echo $HOMEexport HOME=/userdata/systemYou now have 5,000+ GitHub requests/hour on Batocera!