Skip to content

fix(install): resolve the latest tag without the rate-limited GitHub API - #4

Merged
lroolle merged 1 commit into
mainfrom
fix/install-behind-shared-ip
Aug 14, 2026
Merged

fix(install): resolve the latest tag without the rate-limited GitHub API#4
lroolle merged 1 commit into
mainfrom
fix/install-behind-shared-ip

Conversation

@lroolle

@lroolle lroolle commented Aug 14, 2026

Copy link
Copy Markdown
Owner

Found by running the README's own install line, which is the point of
running it.

$ curl -fsSL .../install.sh | bash
curl: (22) The requested URL returned error: 403
error: could not determine the latest release

api.github.com allows 60 unauthenticated requests an hour per IP.
Behind a NAT, a VPN exit, a corporate proxy or a CI runner, that budget
is routinely spent by someone else, and the front door fails with a
message that blames the release.

  • install.sh now resolves the tag from the redirect on
    /releases/latest (not rate limited), falls back to the API, and
    takes BWG_VERSION=v0.2.0 to pin a version outright. The failure
    message now names both escape hatches.
  • bwg update still needs the API for the asset list, but a 403 with
    x-ratelimit-remaining: 0 now says the network's budget is spent and
    points at the releases page, instead of "GitHub API returned 403".

Verification

$ sh install.sh --bin-dir /tmp/bwgtest --skill-dir /tmp/bwgtest/skills
bwg_linux_arm64.tar.gz: OK
Installed /tmp/bwgtest/bwg
Installed /tmp/bwgtest/skills/bwg-cli/SKILL.md
$ /tmp/bwgtest/bwg version
bwg 0.2.0

Two tests cover the message: a rate-limited 403 must say so, and a
plain 403 must not claim to be one.

🤖 Generated with Claude Code

Found by running the README's own one-liner from a container behind a
shared exit IP: it died at its first step with "could not determine the
latest release". api.github.com allows 60 unauthenticated requests an
hour per IP, and a NAT, a VPN exit or a CI runner has usually spent
that budget on someone else's behalf.

install.sh now takes the tag from the redirect on /releases/latest,
which is not rate limited, keeps the API as a fallback, and accepts
BWG_VERSION to pin a version. `bwg update` still uses the API — it
needs the asset list — but a 403 carrying x-ratelimit-remaining: 0 now
says that the network's budget is spent and where to get the binary
meanwhile, instead of "GitHub API returned 403", which reads as a
broken install.

Verified end to end: the installer fetches v0.2.0, checksums it, and
`bwg version` prints 0.2.0.

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
@lroolle
lroolle merged commit c831d5d into main Aug 14, 2026
5 checks passed
@lroolle
lroolle deleted the fix/install-behind-shared-ip branch August 14, 2026 06:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant