CLI Install Fails with GitHub Rate Limit
This guide helps you resolve Brev CLI installations that fail because the install script’s request to the GitHub API was rate limited.
Platform: Any platform that installs the CLI with the install-latest.sh script, including Linux and Windows (WSL). Homebrew installs on macOS are unaffected.
Problem
The install command exits immediately with:
No binary is installed, and brev --version reports that the command is not found.
Why This Happens
Before downloading anything, the install script queries the GitHub releases API to find the correct binary for your operating system and architecture:
GitHub allows 60 unauthenticated requests per hour, and that budget is counted per source IP address, not per user. When your outbound traffic shares an egress IP, such as a corporate NAT gateway, a VPN exit node, a cloud NAT, or a pool of CI runners, everyone behind that address draws from the same 60 requests. Colleagues installing the CLI around the same time, or unrelated traffic leaving through the same exit node, can exhaust the quota before you run the command.
Prerequisites
- A GitHub account (any plan, including free)
curlinstalled and available in$PATH- Outbound network access to
api.github.comandgithub.com
Solution
Do not run the installer with sudo. It resets the environment, so GITHUB_TOKEN and your gh credentials are not passed through to the script. The installer writes to ~/.local/bin and does not require root.
Change your outbound network route
Your traffic leaves through a shared exit IP whose 60-request budget is frequently already spent. Moving to a different source IP gives you a fresh allowance:
- If you are connected to a VPN, turn it off and re-run the installer. A VPN exit node is shared with every other user on that server.
- Change the VPN location to a different country, region, or server if you must stay connected. Each location has its own exit IP and its own separate quota.
- Remove any configuration that forces traffic through a shared egress IP address, such as a proxy, a corporate network policy, or a custom route.
Export a GitHub token
This applies to any environment, including minimal container images and CI runners where the GitHub CLI is unavailable.
Create a personal access token
Go to GitHub personal access token settings and create either a classic token or a fine-grained token.
The token is used only to identify you, so that the request counts against your account’s limit of 5,000 requests per hour instead of the shared IP address. It does not need access to your account or your repositories, because the installer reads nothing but public release metadata. Keep it as narrow as GitHub allows:
- Classic token: leave every scope unchecked.
- Fine-grained token: set Repository access to Public repositories (read-only). No repository permissions need to be selected, and GitHub includes read-only Metadata access automatically.
export applies only to the current shell session. Add the line to ~/.bashrc or ~/.zshrc to persist it across sessions, and never commit a token to a repository.
Authenticate with the GitHub CLI
If gh is installed, the install script calls gh auth token and uses the result automatically, so no further configuration is required.
Authenticating the request raises the limit to 5,000 requests per hour and charges it to your GitHub account instead of the shared IP.
Rate limits reset on a rolling hourly window. If none of these solutions are available, waiting up to an hour and retrying also works.
Verification
Check your remaining budget with the /rate_limit endpoint, which does not count against your quota:
Under resources.core, a limit of 60 means the request is still unauthenticated and 5000 means authentication is working. The remaining field shows how many requests are left in the current window.
Then confirm the CLI installed: