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

[Bug]: dotnet nuget push not detecting apikey for 3rd party symbol server #11846

Closed
erdembayar opened this issue May 31, 2022 · 3 comments · Fixed by NuGet/NuGet.Client#5122
Closed

Comments

@erdembayar
Copy link
Contributor

erdembayar commented May 31, 2022

NuGet Product Used

dotnet.exe

Product Version

n/a

Worked before?

No response

Impact

It bothers me. A fix would be nice

Repro Steps & Context

  1. Set apikey for myget repo v3 index.
  2. Create nupkg + snupkg.
  3. Please do dotnet nuget push .\somepackage.1.1.0.nupkg --source myget
    It doesn't detect apikey for 3rd party symbol server, not sure if it's myget implementation issue or nuget.client issue. It looks workaround is pass actual apikey as parameter in cli.
    image

As you can see in fiddler log it's missing apikey header.
image

  1. Also do nuget push .\somepackage.1.1.0.nupkg -source myget then it asks for username.
    It looks workaround is pass actual apikey as parameter in cli.
    image

Verbose Logs

No response

@kartheekp-ms
Copy link
Contributor

AFAIK, NuGet checks if the third party package source supports publish symbols. If the third party package source can provide SymbolPackagePublish resource in the ServiceIndex then passing the symbol apikey via command line is not required.

https://github.com/NuGet/NuGet.Client/blob/d970aa3fd6d607642ceb0905498ec0d75a03562c/src/NuGet.Core/NuGet.Commands/CommandRunners/PushRunner.cs#L61-L67

Jm2c, it is not a NuGet bug. Reference - https://docs.microsoft.com/en-us/nuget/api/symbol-package-publish-resource

@whatatripp
Copy link

Hi @kartheekp-ms @jeffkl

This definitely seems to be a bug in the client; I did not debug the code you linked to, but something is not being wired up.

ProGet provides a SymbolPackagePublish resource in the feed ServiceIndex, but the API key is not used. Here is snippet:

{"@id":"http://proget.localhost/nuget/nuggets/symbolpackage","@type":"SymbolPackagePublish/4.9.0"}

After setting an explicit API key for the */symbolpackage URL, this prompt goes away. It seems MyGet works the same way, and the API key is ignored.

We'd really appreciate if you could fix this, to make our mutual users/customers have an easier debugging experience :)

@erdembayar
Copy link
Contributor Author

We'd really appreciate if you could fix this, to make our mutual users/customers have an easier debugging experience :)

Please upvote the original issue on top, we prioritize investigations based on community engagement such as comments and up-votes.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
5 participants