ripgrep is causing 403s

Resolved 💬 6 comments Opened Aug 20, 2025 by zengk95 Closed Sep 22, 2025
💡 Likely answer: A maintainer (dylan-hurd-oai, contributor) responded on this thread — see the highlighted reply below.

What version of Codex is running?

n/a

Which model were you using?

n/a

What platform is your computer?

Linux

What steps can reproduce the bug?

When I'm trying to install this in CI, I'm getting

#9 [4/8] RUN npm install -g @openai/codex
#9 34.19 npm error code 1
#9 34.19 npm error path /usr/lib/node_modules/@openai/codex/node_modules/@vscode/ripgrep
#9 34.19 npm error command failed
#9 34.19 npm error command sh -c node ./lib/postinstall.js
#9 34.19 npm error Finding release for v13.0.0-13
#9 34.19 npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
#9 34.19 npm error Deleting invalid download cache
#9 34.19 npm error Download attempt 1 failed, retrying in 2 seconds...
#9 34.19 npm error Finding release for v13.0.0-13
#9 34.19 npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
#9 34.19 npm error Deleting invalid download cache
#9 34.19 npm error Download attempt 2 failed, retrying in 4 seconds...
#9 34.19 npm error Finding release for v13.0.0-13
#9 34.19 npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
#9 34.19 npm error Deleting invalid download cache
#9 34.19 npm error Download attempt 3 failed, retrying in 8 seconds...
#9 34.19 npm error Finding release for v13.0.0-13
#9 34.19 npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
#9 34.19 npm error Deleting invalid download cache
#9 34.19 npm error Download attempt 4 failed, retrying in 16 seconds...
#9 34.19 npm error Finding release for v13.0.0-13
#9 34.19 npm error GET https://api.github.com/repos/microsoft/ripgrep-prebuilt/releases/tags/v13.0.0-13
#9 34.19 npm error Deleting invalid download cache
#9 34.19 npm error Error: Request failed: 403
#9 34.19 npm error     at ClientRequest.<anonymous> (/usr/lib/node_modules/@openai/codex/node_modules/@vscode/ripgrep/lib/download.js:110:24)
#9 34.19 npm error     at Object.onceWrapper (node:events:622:26)
#9 34.19 npm error     at ClientRequest.emit (node:events:507:28)
#9 34.19 npm error     at HTTPParser.parserOnIncomingClient (node:_http_client:772:27)
#9 34.19 npm error     at HTTPParser.parserOnHeadersComplete (node:_http_common:117:17)
#9 34.19 npm error     at TLSSocket.socketOnData (node:_http_client:614:22)
#9 34.19 npm error     at TLSSocket.emit (node:events:507:28)
#9 34.19 npm error     at addChunk (node:internal/streams/readable:559:12)
#9 34.19 npm error     at readableAddChunkPushByteMode (node:internal/streams/readable:510:3)
#9 34.19 npm error     at Readable.push (node:internal/streams/readable:390:5)
#9 34.19 npm error Error: Request failed: 403

Our CI runners all share the same IP so it makes it think that we're hitting the GH api a ton, running into rate limits.

What is the expected behavior?

The install would work, without having to hit github releases. It should be through npm.

What do you see instead?

Maybe have a separate way to install ripgrep? Or not have it as a dependency?

Additional information

_No response_

View original on GitHub ↗

6 Comments

teamfighter · 1 year ago

+1 for that

willxy · 12 months ago

Same but it's giving me 401's
90 error Error: Request failed: 401

eraser00 · 11 months ago

This is a well-known issue about the [github-api-limit]https://github.com/microsoft/vscode-ripgrep?tab=readme-ov-file#github-api-limit-note

You can produce an API key, set the GITHUB_TOKEN environment variable to it when downloading packages from GitHub. This increases your API limit.

n01e0 · 11 months ago
FROM alpine:latest AS builder
RUN apk --no-cache add build-base nodejs npm upx
# Install codex cli
RUN npm install -g --ignore-scripts @openai/codex && \
    upx -9 --lzma /usr/local/lib/node_modules/@openai/codex/bin/codex-x86_64-unknown-linux-musl

# and then COPY to CI Image

this is my solution. npm install -g --ignore-scripts @openai/codex and just use a binary (and pack that for lightweight container)

dylan-hurd-oai contributor · 11 months ago

👍 we recommend installing ripgrep separately and skipping the postinstall script with npm install -g --ignore-scripts @openai/codex. We may improve this in the future but need to consider impacts to bundle size

bolinfest collaborator · 11 months ago

I have https://github.com/openai/codex/pull/3660 out to fix this for real.