-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
NuGet push returns 401 (Unauthorized) when using --api-key
#20717
Comments
That's simple, Changed into feature request. |
I have added this in #20717. |
I still get 401 when using an api-key on 1.17.2 > dotnet nuget push -s https://gitea.domain.test/api/packages/org/nuget/index.json -k some-api-key .\bin\some.package.2.1.6.nupkg --force-english-output
error: Unable to load the service index for source https://gitea.domain.test/api/packages/org/nuget/index.json.
error: Response status code does not indicate success: 401 (Unauthorized). |
@viceice this was added in 1.18.0-dev, and was not backported to 1.17.2 |
@techknowlogick what about #20734 ? Isn't that the backport to v1.17.1 ? 😕 Also mentioned in release notes: |
Looked at this again, and yes it does not work the way you use it. :-) |
Addition to #20734, Fixes #20717 The `/index.json` endpoint needs to be accessible even if the registry is private. The NuGet client uses this endpoint without authentification. The old fix only works if the NuGet cli is used with `--source <name>` but not with `--source <url>/index.json`. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Addition to go-gitea#20734, Fixes go-gitea#20717 The `/index.json` endpoint needs to be accessible even if the registry is private. The NuGet client uses this endpoint without authentification. The old fix only works if the NuGet cli is used with `--source <name>` but not with `--source <url>/index.json`. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
The error indicates a connection problem.
|
Description
I created an organization with my main account. I can use my account to push nuget packages in to the repository for my organization. Then I generated an API token using the GUI, saved that to my password manager. I've been having trouble using that token.
When I run this command:
The response is:
Gitea Version
Gitea Version: 1.17.0
Can you reproduce the bug on the Gitea demo site?
No
Log Gist
2022/08/04 14:59:45 ...kages/nuget/nuget.go:25:apiError() [E] [62ec4151-12] context canceled
Screenshots
No response
Git Version
git version 2.31.1
Operating System
Operating System: Red Hat Enterprise Linux 8.6 (Ootpa) CPE OS Name: cpe:/o:redhat:enterprise_linux:8::baseos Kernel: Linux 4.18.0-372.16.1.el8_6.x86_64
How are you running Gitea?
Installed from binary, running as a service.
Database
PostgreSQL
The text was updated successfully, but these errors were encountered: