I've tried every imaginable combination of the example commands in the official docs, but these are all using nuget.exe.
The following nuget issue states that publishing with the dotnet cli to the offical nuget.org v3 endpoint https://api.nuget.org/v3/index.json
works.
When publishing to the MyGet v3 endpoint with
dotnet nuget push <package-name>.nupkg --api-key <write-api-key> --source https://www.myget.org/F/<some-site>/api/v3/index.json
the .nupkg
file is published but the .snupkg
one is not.
When publishing the .snupkg
file only to the MyGet v3 endpoint with
dotnet nuget push <package-name>.snupkg --api-key <write-api-key> --source https://www.myget.org/F/<some-site>/api/v3/index.json
the result is:
error: Unable to load the service index for source https://www.myget.org/F/<some-site>/api/v3/index.json.
error: Response status code does not indicate success: 401 (Unauthorized).
Also tried with:
dotnet nuget push <package-name>.snupkg --api-key <write-api-key> --source https://www.myget.org/F/<some-site>/api/v3/index.json --no-service-endpoint
.. with the same result
Manually uploading the .snupkg file via the WebUI works.
I'm using:
.NET Core SDK (reflecting any global.json):
Version: 3.1.201
Commit: b1768b4ae7
Any hints?
This unanswered question seems somewhat linked