Nuget push Cannot prompt for input in non-interactive mode

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

nuget: cannot prompt for input in non-interactive mode, nuget: cannot prompt for input in non-interactive mode. If you've ever seen this annoying error in your various build server logs, or even when running msbuild locally from the command line, you're probably getting annoyed. How do I specify the username in the package manager prompt? Here is the error: NuGet.exe : Cannot prompt for input in non-interactive mode. I can't find my nuget.config file also, otherwise I could modify that. I have a packages.config file.

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.

NuGet: Cannot prompt for input in non-interactive mode – TeamCity , NuGet: Cannot prompt for input in non-interactive mode Follow. Avatar [​Publishing artifacts] Collecting files to publish: [Build\Release\** =>] The specified Package Source in NuGet step and Feed URI in NuGet Feed Credentials should be the same. Please make sure that you use https in both cases and there is no additional slashes at the end. If it does not help, please attach new full build log.

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.

NuGet publish, Hi. I need help to figure out Nuget publish problem with a test project. The issue might be that it cannot prompt for input in non-interactive mode. I need help to figure out Nuget publish problem with a test project. The issue might be that it cannot prompt for input in non-interactive mode. I am new to Octopus and TC so please be patient with me. The following config has worked fine before so i am not sure what happened to it.

[Test Failure][Signing] "Cannot prompt for input in non-interactive , Details about Problem NuGet Version : Release-4.6.0-Preview2 4745 VS [Test Failure][Signing] "Cannot prompt for input in non-interactive mode" when  Ensure you’re logged in as the user which will be running the builds (if not yourself), and update the nuget source reference (which will be in a user-specific appdata config file) with the password:

nuget.exe delete won't prompt for credentials (it's in non-interactive , Using nuget.exe 3.4.3.854 REPRO nuget.exe delete foo 99.99 -Source UserName: Cannot prompt for input in non-interactive mode. nuget.exe delete and push will ask for credentials unless -NonInteractive is used. v-luzh changed the title [Test Failure][Signing]Can’t prompt for input in non-interactive mode when signing with a certificate is password protected without using CertificatePassword [Test Failure][Signing] "Cannot prompt for input in non-interactive mode" when signing with a certificate is password protected without using CertificatePassword

Unable to push Nuget package to VSTS, Cannot prompt for input in non-interactive mode. Show comments 5  UserName: Cannot prompt for input in non-interactive mode. EXPECT. The command prompt shouldn't be in non-interactive mode. If there is some other reason that the username can't be typed, then show the real reason.

NuGet push prompting for credentials when using -ApiKey Admin , Hi, When I push to a feed from the command line using -ApiKey Admin:Admin I am I am unable to push in non-interactive mode. provide credentials for: <​feedname> Cannot prompt for input in non-interactive mode. By default NuGet.exe prompts for the username and password for authenticated feeds during Push operation. And there is no option for providing the username and password as an input during push operation. If authenticated feed is added to the NuGet sources list with username and password, it wont prompt for username and password during Push operation.

Comments
  • The same trick worked for me. In my case, the NuGet server was configured in Windows IIS and used Windows authentication. 'Saving password' is essential or it won't work as already described here.
  • I'm using a valid ApiKey, but it's still giving me the same error. Has anyone found a fix for this?