-
-
Notifications
You must be signed in to change notification settings - Fork 5.6k
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
docker login fail #33227
Comments
Please regenerate your token. By the way, it's recommend to follow the official document to use sub-path: https://docs.gitea.com/next/administration/reverse-proxies?_highlight=rev#nginx-with-a-sub-path |
tried generating new token but the issue persist, which permissions should I set? I'll configure again ngnix as soon as possible. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as off-topic.
This comment was marked as off-topic.
By reading code, there could be another possible case: the error message is misleading.
Update: OK, I think the problem is caused by the incorrect reverse proxy config : |
I guess this will fix your problem: do not pass the leading "/" to Gitea:
But it is still not quite right, please use the official reverse proxy config. |
I'll test the fix within the day and I'll let you know if it works. |
Description
I've used docker login in the past and it worked.
It has been 6 months I haven't pushed any image, than the last week I had to updtate an image and the push failed.
I tried to login docker again using the following command:
docker login -u <gitea_url>
but it fails.
https://integra-swarm1:443/v2/": unauthorized: authGroup.Verify
gitea logs:
Failed to verify user: token is malformed: token contains an invalid number of segments
2025/01/12 11:44:33 ...eb/routing/logger.go:102:func1() [I] router: completed GET //v2/token?account=integrazione&client_id=docker&offline_token=true&service=container_registry for 10.0.0.2:0, 401 Unauthorized in 0.3ms @ packages/api.go:97(packages.verifyAuth)
unfortunatly my gitea is hosted behind an ngnix reverse proxy using a subpath url:
then I configured a specific rewrite for /v2
this configuration was working as I have some images published:
devopswebtools.server
Container
Published
9 months ago
by
integrazione
Gitea Version
1.22.6
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
No response
Screenshots
No response
Git Version
No response
Operating System
No response
How are you running Gitea?
docker compose
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: