[BUG] /install-github-app does not allow to authenticate when running from container
Environment
- Platform (select one):
- [ ] Anthropic API
- [ ] AWS Bedrock
- [ ] Google Vertex AI
- [x] Other: <!-- specify -->
- Claude CLI version: v1.0.44
- Operating System: Docker Container with alpine Linux image
- Terminal: Bash
Bug Description
When trying to autheticate to configure /install-github-app, it, the terminal shows an url to copy/paste in the browser, like in the case for authenticating to Claude Code itself.
First a minor issue, the link it cannot be selected properly with the mouse, it also copies the window borders character, for some reason this issue doesen't happen in the main auth process.
And then, the real issue, after pasting the code and selecting Authorize, the auth wep page returns a code to be pasted in the terminal (once again, like the main auth proces), but the terminal does not give any prompt to paste the code in.
It remains stuck in "Opening browser to sign in with your Claude account… " with the pasted url below indefinitely.
As I only use Claude Code in Docker, I'm not sure if this behavior is reproducible with a native OS install.
Steps to Reproduce
- Install Claude Code in a docker container with Alpine Linux
- From within the container, start claude and authenticate
- Type /install-github-app
- Select current repository
- Select first option
- Select "Long lived token with Claude subscription"
- Copy the displayed URL and paste in a browser
- Click Authorize and copy given code
- Go back to the terminal
Expected Behavior
The terminal should provide a prompt where to paste the copied code
Actual Behavior
The terminal remains stuck in "Opening browser to sign in with your Claude account… " with the URL below.
Additional Context
Dockerfile used:
FROM alpine:latest
RUN apk update && apk add --no-cache \
curl \
wget \
bash \
git \
sudo \
nodejs \
npm \
python3 \
py3-pip \
python3-dev \
github-cli \
ca-certificates \
openssl
RUN apk add --no-cache docker docker-cli-compose
RUN npm install -g @anthropic-ai/claude-code
ARG HOST_UID=1000
ARG HOST_GID=1000
RUN addgroup -g $HOST_GID dev && \
adduser -D -u $HOST_UID -G dev dev
RUN adduser dev docker
RUN mkdir -p /workspace && \
chown -R dev:dev /workspace
USER dev
WORKDIR /workspace
CMD ["/bin/bash"]
21 Comments
I was able replicate this on Ubuntu via WSL and (roughly) a fresh native Windows install. The browser does seem to work with a native terminal, however the generated challenge link seems to be broken. See: #3371
The common denominator is that we're both trying to use the subscription model.
Same issue here on both via wsl and native Windows install.
I've experienced the same issue on WSL (Ubuntu). I've got the authentication code with instructions to paste it into Claude Code, but I'm unable to do so.
<img width="1048" height="166" alt="Image" src="https://github.com/user-attachments/assets/a6fbcf44-216d-4b86-96b6-d39210062bf9" />
Same here. I had to expand the terminal so that the url would be all in one line, and I could copy-paste it into the browser. But Claude Code never allowed me to enter the given token.
Same, I'm running it from WSL so it doesn't open the browser. But there's no prompt to enter the code.
<img width="657" height="463" alt="Image" src="https://github.com/user-attachments/assets/95a116c9-0209-4e67-9849-97ed99903b80" />
I think I have found a workaroud.
After pasting the code in an external browser (making sure you remove spurious whitespaces and symbols) and Claude gives you a code to copy, just exit (CTRL D+D) Claude Code, restart it and follow the same process but choose to authenticate with an API key.
Paste the code you got from the previous steps, the installation should complete.
It works! Thanks.
It worked!! Thank you!
El dom, 13 jul 2025, 09:10, vincenzoauteri @.***>
escribió:
@vincenzoauteri does that mean treating the code as an API key? Because I thought claude's API key usually starts with
sk-something. Anyway I've tried that too but didn't manage to get it working, it gives error when I call claude in an issue.May I know two things that I suspect might differ:
``
yml
`with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# Or use OAuth token instead:
# claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
ANTHROPIC_API_KEYAre you using the
orCLAUDE_CODE_OAUTH_TOKEN`?repo > Settings > Secrets and variables > Actions > Repository secrets)?Yeah, from the Claude Code CLI it looked like it worked, but then the
github action still fails because of token issue
El dom, 13 jul 2025, 11:23, Luqmaan Sulaiman @.***>
escribió:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
But yeah, after triggering an action it fails, although I was not sure if that was the reason.
Claude Code Review / claude-review (pull_request)Failing after 25s
So, it is not an effective workaround unfortunately, it just lets the installation end as it were successful (very Claude-like) without checking if the key is in a correct format.
Hello @vincenzoauteri
It turns out we can connect to GitHub actions manually using
CLAUDE_CODE_OAUTH_TOKEN.claude setup-tokenCLAUDE_CODE_OAUTH_TOKEN, possibly starting withsk-settings/secrets/actionsand addCLAUDE_CODE_OAUTH_TOKENas a repository secretreplace this line with
Confirmed. This is the way. Thank you!
EDIT: I confirm the workaround from @ardallie works for me as well.
Initially I was pasting as secret the auth code from the browser, not the token returned by Claude Code...
Thank you!
@ardallie legend, it is working... thanks!
Sounds like this is resolved. We'll work on updating our docs!
it's a workaround, not really a solution
It is not solved, at all. This is not working
El mar, 15 jul 2025, 21:04, Ashwin Bhat @.***> escribió:
This issue has been inactive for 30 days. If the issue is still occurring, please comment to let us know. Otherwise, this issue will be automatically closed in 30 days for housekeeping purposes.
This issue has been automatically closed due to 60 days of inactivity. If you're still experiencing this issue, please open a new issue with updated information.
This issue has been automatically locked since it was closed and has not had any activity for 7 days. If you're experiencing a similar issue, please file a new issue and reference this one if it's relevant.