I am running this command
nuget push Package.1.0.0.0.nupkg -s http://mysource.com/ xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx -ConfigFile ..\..\.nuget\nuget.config
I receive this error
UserName: Cannot prompt for input in non-interactive mode.
I have specified the nuget.config file which has the username and cleartextpassword like this
<packageSources>
<add key="NuGet official package source" value="http://www.nuget.org/api/v2" />
<add key="https://www.nuget.org/api/v2/" value="https://www.nuget.org/api/v2/" />
<add key="PackageName" value="http://mysource.com/nuget" />
</packageSources>
....
<packageSourceCredentials>
<PackageName>
<add key="Username" value="<username>" />
<add key="ClearTextPassword" value="<clearpassword>" />
</PackageName>
</packageSourceCredentials>
Why doesn't this work? I am running the batch file from within VS2013 the nuget version I am using is, NuGet Version: 2.8.50926.602
The only way I could make this work right now was based on this post from Robin Osborne.
http://mysource.com/nuget
) and visited it directly using iexploreOf course, this is not how it's intended to work, but at least it unblocked me from the same situation you were experiencing. Treat it as a workaround.
This is not for using the nuget.config file but I had the same problem just running the command line PUSH...
Go to your VSTS website and click the Package link. If you have a feed, click the Connect to feed link. If not, the same link/button will be present on the screen. Click Generate NuGet credentials. Copy the command and paste it into VS PM Console window. Then follow instruction #3 on the page and it works inside VS.
Don't know if this will help but. I had the same error when trying to push to our private Klondike server. We fixed this by using a valid ApiKey rather than modifying the config.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With