bagetter / BaGetter

A lightweight NuGet and symbol server
https://www.bagetter.com
MIT License
166 stars 38 forks source link

APIKEY #148

Closed mubarak0443 closed 3 weeks ago

mubarak0443 commented 3 weeks ago

Hi ,

I have updated API key manually in appsettings.json .

But when i tired to push package , it is keep asking for UserName and Password....what details should be given

also what is the command prompt to push package using API key in Bagetter.

Thanks for your help ahead.

Regenhardt commented 3 weeks ago

Have you restarted BaGetter after changing the appsettings.json? It only reads the config once, at startup.

If you have an API key set in your environment, it will override the one in the appsettings.json file, so make sure there isn't one.

If you use the nuget cli, you can add "-ApiKey " to your call.
For dotnet nuget push you have to use "--api-key " instead.

mubarak0443 commented 3 weeks ago

Have you restarted BaGetter after changing the appsettings.json? It only reads the config once, at startup.

If you have an API key set in your environment, it will override the one in the appsettings.json file, so make sure there isn't one.

If you use the nuget cli, you can add "-ApiKey " to your call. For dotnet nuget push you have to use "--api-key " instead.

Hi , Thanks for your reply , it works well as per your instructions.

But would like to know in case if we override API key through Set , may know how to check that API key in bagetter. Any possible to check override API key inside Bagetter.

Thanks for your help ahead!

Regenhardt commented 3 weeks ago

There is no way of getting the API key from BaGetter, and I don't want to add one, as that would be a vulnerability either way.