2
votes

while pushing a nuget package to a local feed at http://localhost/site, it asks for credentials.

eg: nuget push ‘OracleDataAccess.1.0.0.nupkg’ -s 'http://10.xx.xx.2/SNNuget/mykey'

I am able to browse the feed directly and see the packages that I manually placed there. Any possibility to disable this? or any other solutions?

3

3 Answers

2
votes

Isn't that what the ApiKey is for?

nuget push foo.nupkg 33300000-3330-3330-3330-333033303330 -s http://customsource/ 
1
votes

Perhaps the following Gist can help you? https://gist.github.com/xavierdecoster/3205826

It contains the nuget.exe commands that allow you to store your feed credentials on your development machine.

1
votes

You can find your Api Key under https://www.nuget.org/account, it looks like this: enter image description here and you can either pass the API Key as a command line argument to nuget push or preferably use nuget setapikey <key> -source <url> [options] to bind a server URL with its credentials and never have to worry about it again :)