[BUG] /install-github-app does not allow to authenticate when running from container

Resolved 💬 21 comments Opened Jul 9, 2025 by vincenzoauteri Closed Dec 10, 2025
💡 Likely answer: A maintainer (ashwin-ant, collaborator) responded on this thread — see the highlighted reply below.

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

  1. Install Claude Code in a docker container with Alpine Linux
  2. From within the container, start claude and authenticate
  3. Type /install-github-app
  4. Select current repository
  5. Select first option
  6. Select "Long lived token with Claude subscription"
  7. Copy the displayed URL and paste in a browser
  8. Click Authorize and copy given code
  9. 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"]

View original on GitHub ↗

21 Comments

dmngrsk · 1 year ago

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.

luqmaansu · 1 year ago

Same issue here on both via wsl and native Windows install.

ardallie · 1 year ago

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" />

raziel5746 · 1 year ago

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.

shipurjan · 1 year ago

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" />

vincenzoauteri · 1 year ago

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.

ardallie · 1 year ago
I think I have found a workaroud.

It works! Thanks.

raziel5746 · 1 year ago

It worked!! Thank you!

El dom, 13 jul 2025, 09:10, vincenzoauteri @.***>
escribió:

vincenzoauteri left a comment (anthropics/claude-code#3233) <https://github.com/anthropics/claude-code/issues/3233#issuecomment-3067010035> 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. — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/3233#issuecomment-3067010035>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJKLNBURKP7RXAHDAFNIUHL3IJED7AVCNFSM6AAAAACBFLJQRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANRXGAYTAMBTGU> . You are receiving this because you commented.Message ID: @.***>
luqmaansu · 1 year ago
Paste the code you got from the previous steps, the installation should complete.

@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:

  1. What's your claude.yml setting like on this part:

``yml
with:
anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}
# Or use OAuth token instead:
# claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
`
Are you using the
ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN`?

  1. Which one is contained in your repo's secrets (repo > Settings > Secrets and variables > Actions > Repository secrets)?
raziel5746 · 1 year ago

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ó:

luqmaansu left a comment (anthropics/claude-code#3233) <https://github.com/anthropics/claude-code/issues/3233#issuecomment-3067077309> Paste the code you got from the previous steps, the installation should complete. @vincenzoauteri <https://github.com/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: 1. What's your claude.yml setting like on this part: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} # Or use OAuth token instead: # claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} Are you using the ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN? 2. Which one is contained in your repo's secrets (repo > Settings > Secrets and variables > Actions > Repository secrets)? — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/3233#issuecomment-3067077309>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJKLNBVZGO4EGQH3VN3GVMT3IJTUJAVCNFSM6AAAAACBFLJQRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANRXGA3TOMZQHE> . You are receiving this because you commented.Message ID: @.***>
vincenzoauteri · 1 year ago
> Paste the code you got from the previous steps, the installation should complete. @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: 1. What's your claude.yml setting like on this part: with: anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }} # Or use OAuth token instead: # claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }} Are you using the ANTHROPIC_API_KEY or CLAUDE_CODE_OAUTH_TOKEN? 2. Which one is contained in your repo's secrets (repo > Settings > Secrets and variables > Actions > Repository secrets)?

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.

ardallie · 1 year ago

Hello @vincenzoauteri

It turns out we can connect to GitHub actions manually using CLAUDE_CODE_OAUTH_TOKEN.

  1. In a terminal with Claude Code installed, run claude setup-token
  2. Complete the workflow in a browser and copy authentication code
  3. Paste it back to Claude Code to receive a CLAUDE_CODE_OAUTH_TOKEN, possibly starting with sk-
  4. For each repository, go to settings/secrets/actions and add CLAUDE_CODE_OAUTH_TOKEN as a repository secret
  5. In your GH action config file:
        with:
          anthropic_api_key: ${{ secrets.ANTHROPIC_API_KEY }}

replace this line with

        with:
          claude_code_oauth_token: ${{ secrets.CLAUDE_CODE_OAUTH_TOKEN }}
luqmaansu · 1 year ago
1. In a terminal with Claude Code installed, run claude setup-token

Confirmed. This is the way. Thank you!

vincenzoauteri · 1 year ago

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!

madnz8 · 1 year ago

@ardallie legend, it is working... thanks!

ashwin-ant collaborator · 1 year ago

Sounds like this is resolved. We'll work on updating our docs!

shipurjan · 1 year ago

it's a workaround, not really a solution

raziel5746 · 1 year ago

It is not solved, at all. This is not working

El mar, 15 jul 2025, 21:04, Ashwin Bhat @.***> escribió:

ashwin-ant left a comment (anthropics/claude-code#3233) <https://github.com/anthropics/claude-code/issues/3233#issuecomment-3076222986> Sounds like this is resolved. We'll work on updating our docs! — Reply to this email directly, view it on GitHub <https://github.com/anthropics/claude-code/issues/3233#issuecomment-3076222986>, or unsubscribe <https://github.com/notifications/unsubscribe-auth/AJKLNBRQKGQV4T5XBNKMB3L3IWJIFAVCNFSM6AAAAACBFLJQRWVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZTANZWGIZDEOJYGY> . You are receiving this because you commented.Message ID: @.***>
github-actions[bot] · 9 months ago

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.

github-actions[bot] · 7 months ago

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.

github-actions[bot] · 7 months ago

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.