Skip to content
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

unauthorized: reqPackageAccess when pushing to container registry #31531

Closed
dlmw opened this issue Jun 30, 2024 · 7 comments
Closed

unauthorized: reqPackageAccess when pushing to container registry #31531

dlmw opened this issue Jun 30, 2024 · 7 comments
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/packages type/bug

Comments

@dlmw
Copy link

dlmw commented Jun 30, 2024

Description

I successfully logged in to my user with docker login. I logged in with my usual username/password. When I push the image, I get the error unauthorized: reqPackageAccess.

What's the issue?

Gitea Version

1.22.0

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 Swarm

Database

PostgreSQL

@dlmw dlmw added the type/bug label Jun 30, 2024
@kemzeb
Copy link
Contributor

kemzeb commented Jul 1, 2024

Thanks for the bug report! Are there any logs that you would be able to provide from your Gitea instance associated with you pushing to your registry?

@dlmw
Copy link
Author

dlmw commented Jul 7, 2024

2024/07/07 08:32:03 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/dlmw/minecraft/blobs/uploads/ for 10.0.0.2:0, 401 Unauthorized in 1.1ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAccess.4)
2024/07/07 08:32:03 ...eb/routing/logger.go:102:func1() [I] router: completed POST /v2/dlmw/minecraft/blobs/uploads/ for 10.0.0.2:0, 401 Unauthorized in 1.1ms @ packages/api.go:42(packages.ContainerRoutes.func2.1.reqPackageAccess.4)

I think those are the relevant ones.

@delvh
Copy link
Member

delvh commented Jul 7, 2024

You need to supply a PAT to authenticate yourself to Gitea (this has nothing to do with Docker). Your token needs either packages.Read or packages.Write permission, in this case probably write, and you must be allowed to push a package to the given user.,

@delvh delvh added the issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail label Jul 7, 2024
@dlmw
Copy link
Author

dlmw commented Jul 7, 2024

How do I do that if it's not related to Docker?

@delvh
Copy link
Member

delvh commented Jul 7, 2024

grafik

@dlmw
Copy link
Author

dlmw commented Jul 7, 2024

Thank you. A bit off-topic but is there a way to push an image to a repository instead of a user?

@delvh
Copy link
Member

delvh commented Jul 7, 2024

No, but you can link a package to a repo once it has been pushed.

@dlmw dlmw closed this as completed Jul 7, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
issue/needs-feedback For bugs, we need more details. For features, the feature must be described in more detail topic/packages type/bug
Projects
None yet
Development

No branches or pull requests

4 participants