[1.17.0-rc1] Nuget Package Registry PUT always Unauthorized #9119

Closed
opened 2025-11-02 08:29:59 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @LukasKlepper on GitHub (Jun 23, 2022).

Description

I can't push Nuget Packages via dotnet nuget cli. It always says:

gitea-test | 2022/06/23 13:20:09 [62b46889] router: completed PUT /api/packages/my-company/nuget/ for xxx.xx.x.x:xxxxx, 401 Unauthorized in 0.6ms @ packages/api.go:31(packages.reqPackageAccess), no deeper logs.

My dotnet nuget cmd:

dotnet nuget add source --name gitea-test-local --username user --password pw http://myip:port/api/packages/my-company/nuget/index.json

dotnet nuget push --source gitea-test-local newtonsoft.json.13.0.2-beta1.nupkg

I've triple checked my authorization, that shouldn't be the problem. Pushing a docker image worked with the same credentials and user in the same organisation.

I tried both nuget source options with clear text password and base64 encrypted.

I'm an Admin but I'm also in a team with the required permissions.
image
image

I'm not able to create organisations on the gitea demo page, so I haven't tested it there.
I've followed the instructions on https://docs.gitea.io/en-us/packages/nuget/

Gitea Version

[1.17.0-rc1]

Can you reproduce the bug on the Gitea demo site?

No

Log Gist

No response

Screenshots

No response

Git Version

2.36.1, Wire Protocol Version 2 Enabled

Operating System

Docker on Linux

How are you running Gitea?

We are using the offical image from DockerHub from Gitea.

We upgraded from 1.15.6 to 1.17.0-rc1 directly.

Gitea is currently in dev-mode.

We are using gitea behind an Apache2 Reverse Proxy via HTTPS to HTTP (locally), makes no difference without proxy. (I've tested it.)

I'm an admin and I have full access to gitea, docker and server.

Database

PostgreSQL

Originally created by @LukasKlepper on GitHub (Jun 23, 2022). ### Description I can't push Nuget Packages via dotnet nuget cli. It always says: `gitea-test | 2022/06/23 13:20:09 [62b46889] router: completed PUT /api/packages/my-company/nuget/ for xxx.xx.x.x:xxxxx, 401 Unauthorized in 0.6ms @ packages/api.go:31(packages.reqPackageAccess)`, no deeper logs. My dotnet nuget cmd: ` dotnet nuget add source --name gitea-test-local --username user --password pw http://myip:port/api/packages/my-company/nuget/index.json ` ` dotnet nuget push --source gitea-test-local newtonsoft.json.13.0.2-beta1.nupkg ` I've triple checked my authorization, that shouldn't be the problem. Pushing a docker image worked with the same credentials and user in the same organisation. I tried both nuget source options with clear text password and base64 encrypted. I'm an Admin but I'm also in a team with the required permissions. ![image](https://user-images.githubusercontent.com/69464569/175310783-4354f7ec-be10-4890-9b03-9a5bcb388b9f.png) ![image](https://user-images.githubusercontent.com/69464569/175311377-8fe6511c-abb3-4b9a-a75e-a46cbd67b3dd.png) I'm not able to create organisations on the gitea demo page, so I haven't tested it there. I've followed the instructions on https://docs.gitea.io/en-us/packages/nuget/ ### Gitea Version [1.17.0-rc1] ### Can you reproduce the bug on the Gitea demo site? No ### Log Gist _No response_ ### Screenshots _No response_ ### Git Version 2.36.1, Wire Protocol Version 2 Enabled ### Operating System Docker on Linux ### How are you running Gitea? We are using the offical image from [DockerHub ](https://hub.docker.com/layers/gitea/gitea/gitea/1.17.0-rc1/images/sha256-eca3cc058158cd4e19e9a1d6ff4b22ce419dbf23e5b0e1b8dc6a80143712429a?context=explore)from Gitea. We upgraded from 1.15.6 to 1.17.0-rc1 directly. Gitea is currently in dev-mode. We are using gitea behind an Apache2 Reverse Proxy via HTTPS to HTTP (locally), makes no difference without proxy. (I've tested it.) I'm an admin and I have full access to gitea, docker and server. ### Database PostgreSQL
GiteaMirror added the type/bug label 2025-11-02 08:29:59 -06:00
Author
Owner

@algernon commented on GitHub (Jul 19, 2022):

Is this perhaps the same bug as #19986? (Just a hunch)

@algernon commented on GitHub (Jul 19, 2022): Is this perhaps the same bug as #19986? (Just a hunch)
Author
Owner

@LukasKlepper commented on GitHub (Jul 20, 2022):

I've just retested it and it seems its to work on the same version with the same permissions. Maybe our proxy messed up the connection, can confirm its not related to the issue mentioned above.

Can be closed.

@LukasKlepper commented on GitHub (Jul 20, 2022): I've just retested it and it seems its to work on the same version with the same permissions. Maybe our proxy messed up the connection, can confirm its not related to the issue mentioned above. Can be closed.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#9119