Skip to content

[Bug]: Can't add github personal access token in the UI #8534

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
1 task done
adamcole123 opened this issue May 16, 2025 · 8 comments
Open
1 task done

[Bug]: Can't add github personal access token in the UI #8534

adamcole123 opened this issue May 16, 2025 · 8 comments
Labels
bug Something isn't working settings Issues related to the settings page

Comments

@adamcole123
Copy link

Is there an existing issue for the same bug? (If one exists, thumbs up or comment on the issue instead).

  • I have checked the existing issues.

Describe the bug and reproduction steps

Im running it in docker using this command:

docker run -it --rm --pull=always -e SANDBOX_RUNTIME_CONTAINER_IMAGE=docker.all-hands.dev/all-hands-ai/runtime:0.38-nikolaik -e LOG_ALL_EVENTS=true -v /var/run/docker.soc k:/var/run/docker.sock -v ~/.openhands-state:/.openhands-state -p 1234:3000 --add-host host.docker.internal: host-gateway --name openhands-app docker.all-hands.dev/all-hands-ai/openhands:0.38

When entering a fine-grained github token after setting up my claude api key, I get this error in the terminal running docker:

INFO: 172.17.0.1:52164 - "POST /api/add-git-providers HTTP/1.1" 401 Unauthorized

This is on Windows.

To be clear, the token im using starts with 'github_pat_', incase that could hint at me using the wrong token.

I have confirmed with curl that my tokens can access my account.

OpenHands Installation

Docker command in README

OpenHands Version

0.38.0

Operating System

WSL on Windows

Logs, Errors, Screenshots, and Additional Context

INFO: 172.17.0.1:52164 - "POST /api/add-git-providers HTTP/1.1" 401 Unauthorized

@adamcole123 adamcole123 added the bug Something isn't working label May 16, 2025
@mamoodi
Copy link
Collaborator

mamoodi commented May 16, 2025

I wonder if this is Windows specific. I just tried with 0.38.0 on Mac and it works fine. I'd be surprised though.
I can check it.

@mamoodi
Copy link
Collaborator

mamoodi commented May 16, 2025

Wait I take that back. Something happened and now I'm getting that error.

I had revoked it that's why :D

@mamoodi
Copy link
Collaborator

mamoodi commented May 16, 2025

Looking at the docs: https://docs.all-hands.dev/modules/usage/how-to/gui-mode
I'm not 100% sure all of that is necessary. I did get it to clone with none of those selected.

Out of curiosity is your user under and organization? Or is this your personal account?

Image

@adamcole123
Copy link
Author

Out of curiosity is your user under and organization? Or is this your personal account?

My account is a personal account, there's an organisation linked to it but i created the organisation and the repo I want to use is a personal repo. Ill try a token with just those permissions and see what happens.

@adamcole123
Copy link
Author

Yep, still no luck with a new token. Hm.

@mamoodi
Copy link
Collaborator

mamoodi commented May 16, 2025

@malhotra5 any idea what could be going wrong here?

@adamcole123
Copy link
Author

Hi wondering if there's an update for this?

@malhotra5
Copy link
Contributor

Hmm this is a bit weird, will take a look into this soon

@mamoodi mamoodi added the settings Issues related to the settings page label May 23, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working settings Issues related to the settings page
Projects
None yet
Development

No branches or pull requests

3 participants