Expiring user tokens with refresh broke when multiple repos were used:
each device flow revoked previous refresh tokens, causing 500 errors
on every refresh attempt. Switched to non-expiring tokens (opt out of
"User-to-server token expiration" in the GitHub App settings) which
coexist across multiple device flows without revoking each other.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Uses pbcopy/xclip/xsel/wl-copy if available. Only shows
"(copied to clipboard)" when a tool was found and succeeded.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Instead of forwarding raw HTML error pages from GitHub to the client
(which dumps unreadable HTML on screen), save them to timestamped files
and retry with exponential backoff (1s, 2s, 4s, up to 4 attempts).
After exhausting retries, return a clean short error message.
Applies to all three GitHub-facing scripts:
- github-mcp-proxy.py (MCP tool calls)
- github-git-proxy.py (git push/pull)
- github_app_token_demo.py (OAuth token generation)
Also fixes connection leaks on exception paths in both proxy files
and adds URLError handling in the token demo for network-level failures.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>