Authentication Errors
Bad Credentials
Error Message:Generate a new token
- Go to GitHub Settings > Developer settings > Personal access tokens
- Click Generate new token → Generate new token (classic)
- Select the
reposcope (full control of private repositories) - Copy the token immediately
Insufficient Permissions
Error Message:- Check token scopes: Go to Settings > Developer settings > Personal access tokens
- Required scopes:
- ✅
repo- Full control of private repositories - ✅
write:discussion- For Galaxy Brain (if using)
- ✅
- Regenerate the token if scopes are missing
- Update
.envwith the new token
Resource Not Accessible
Error Message:Private Repository
Private Repository
If your target repository is private:
- Ensure your token has the
reposcope (not justpublic_repo) - Verify you own the repository or have write access
- If using a helper account, add it as a collaborator
Organization Repository
Organization Repository
If the repository belongs to an organization:
- Check if the organization requires SSO authorization
- Go to Settings > Personal access tokens
- Find your token and click Configure SSO
- Authorize it for the organization
Discussions Not Enabled
Discussions Not Enabled
For Galaxy Brain:
- Go to repository Settings > Features
- Enable ✅ Discussions
- Wait a moment for the feature to activate
Rate Limit Errors
Rate Limit Exceeded
Error Message:- Authenticated requests: 5,000 per hour
- Content-creating requests: 80 per minute
- Secondary rate limits: 2 concurrent requests (for writes)
src/utils/rateLimiter.ts:9-20:
Wait for reset
The easiest solution is to wait. GitHub rate limits reset every hour (or every minute for secondary limits).The CLI will tell you how long to wait:
Reduce concurrency
If you’re hitting secondary rate limits, reduce concurrent operations in your config (if you’ve customized it).
Secondary Rate Limit
Error Message:- Wait 1 minute - Secondary rate limits reset quickly
- The CLI will retry automatically with exponential backoff
- Don’t restart - Let it handle the retry
src/utils/rateLimiter.ts:138-148:
Repository Errors
Repository Not Found
Error Message:Verify the repository exists
Go to
https://github.com/your-username/your-repo in your browser. Does it load?Check the repository name format
It must be in the format
❌ Wrong:
❌ Wrong:
owner/repo:✅ Correct: alice/test-achievements❌ Wrong:
test-achievements❌ Wrong:
alice/test-achievements.gitNo Write Access
Error Message:- If you own the repo: Regenerate your token with the
reposcope - If it’s someone else’s repo: You need to be added as a collaborator with write access
- Fork the repo: Create your own fork and use that as the target
Discussions Not Enabled
Error Message:Enable Discussions
- Scroll to the Features section
- Check ✅ Discussions
- Click Set up discussions if prompted
Operation Errors
Branch Already Exists
Error Message:Branches are automatically deleted after PRs merge. If you see leftover branches, it means a previous run was interrupted before cleanup completed.
Merge Conflict
Error Message:- Rarely occurs during normal operation
- Usually indicates concurrent operations modified the same files
- Most common if you manually modified the repository during execution
- Accept the failure - 47/48 is usually enough for the achievement
- Run again - The CLI will skip completed operations and retry the failed one
PR Already Merged
Error Message:- It’s likely a resume scenario where the PR was merged but the database wasn’t updated
- The operation will be counted as successful
- No action needed
Network Errors
Connection Timeout
Error Message:- Internet connection issues
- GitHub API is down
- Firewall blocking requests
- Proxy configuration issues
Check GitHub status
Visit githubstatus.com to see if GitHub is experiencing issues.
DNS Resolution Failed
Error Message:- Check DNS servers: Try using Google DNS (8.8.8.8) or Cloudflare DNS (1.1.1.1)
- Flush DNS cache:
- Check /etc/hosts: Ensure
api.github.comisn’t blocked
Database Errors
Database Error During Operation
Error Message:Configuration Errors
Missing Configuration
Error Message:.env.
Solution:
Configuration Error
Error Message:| Field | Wrong | Correct |
|---|---|---|
| TARGET_REPO | my-repo | username/my-repo |
| TARGET_REPO | github.com/user/repo | user/repo |
| GITHUB_TOKEN | (missing) | ghp_xxx... |
| GITHUB_USERNAME | (spaces) | no-spaces-allowed |
Stuck Operations
Operations Stuck in “In Progress”
Symptom: Some operations show as “in_progress” in the status view, but nothing is running. Cause: The CLI was interrupted (Ctrl+C or crash) while operations were running. Solution: This is handled automatically! When you run the achievement again, stuck operations are reset: Fromsrc/achievements/base.ts:109-113:
- Detect stuck operations
- Reset them to “pending”
- Retry them
Getting Help
If you encounter an error not covered here:1. Check Error Details
The CLI provides error codes and suggestions:2. Check Logs
The CLI logs detailed information. Look for error messages and stack traces in the terminal output.3. Common Patterns
Authentication Issues
Authentication Issues
- Bad credentials → Regenerate token
- Insufficient permissions → Add
reposcope - Resource not accessible → Check repository access
Rate Limits
Rate Limits
- Rate limit exceeded → Wait for reset (shown in error)
- Secondary rate limit → Wait 1 minute, retry automatically
Network Issues
Network Issues
- Connection timeout → Check internet connection
- DNS failed → Check DNS settings
- GitHub down → Wait and retry later
Database Issues
Database Issues
- Permission denied → Fix file permissions
- Corrupted → Delete and recreate
- Disk full → Free up space
4. File an Issue
If you’ve tried everything and still have issues:- Go to the GitHub repository issues page
- Search for similar issues
- If none found, create a new issue with:
- Error message (full text)
- Steps to reproduce
- Your environment (OS, Node.js version)
- CLI output (sanitize tokens!)
Prevention Tips
Best Practices to Avoid Issues
- Use a test repository - Don’t use a repository with important code
- Check token scopes - Ensure
reposcope is selected when generating tokens - Verify repository access - Make sure you own or have write access to the target repo
- Don’t interrupt during critical operations - Let operations complete when possible
- Keep tokens secure - Never commit
.envto version control - Monitor rate limits - Don’t manually trigger operations while the CLI is running
- Use latest version - Update the CLI regularly:
git pull && npm install