Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login

    Welcome to the Inedo Forums! Check out the Forums Guide for help getting started.

    If you are experiencing any issues with the forum software, please visit the Contact Form on our website and let us know!

    Non-interactive NuGet Restore impossible for ProGet private feeds

    Scheduled Pinned Locked Moved Support
    proget
    11 Posts 1 Posters 13 Views
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ? This user is from outside of this forum
      Guest
      last edited by

      NuGet should already support the -NonInteractive flag when attempting to restore the package, can you add that and see if that helps?

      1 Reply Last reply Reply Quote 0
      • ? This user is from outside of this forum
        Guest
        last edited by

        Setting that flag just makes nuget.exe to throw exception when trying to prompt for credentials:

        System.InvalidOperationException: Cannot prompt for input in non-interactive mode.
        
        1 Reply Last reply Reply Quote 0
        • ? This user is from outside of this forum
          Guest
          last edited by

          In this case, you'll need to put credentials in the nugget.config file.

          https://docs.nuget.org/docs/reference/nuget-config-settings

          1 Reply Last reply Reply Quote 0
          • ? This user is from outside of this forum
            Guest
            last edited by

            Hello

            I am having the same problem that has been described before

            I have a ProGet Chocolatey private feed, which I am using for artifacts built with Team City.

            I have added the credentials for the feed "http://178.33.163.75:81/nuget/Artifacts" in the nuget.config.

            Also, please notice that nuget says it's using the credentials from config.

            But then it asks for the credentials for a completely different url "http://178.33.163.75:81/api/v2/package/Artifacts
            /jobplatform_service/0.0.0.79"

            And since I am in NonInteractive mode, this will fail

            This is the nuget command I enter:

            C:\ProgramData\chocolatey\chocolateyinstall>nuget install jobplatform_service -v
            ersion 0.0.0.79 -source http://178.33.163.75:81/nuget/Artifacts -NonInteractive

            This is the result:

            Using credentials from config. UserName: TCDeploy
            Please provide credentials for: http://178.33.163.75:81/api/v2/package/Artifacts
            /jobplatform_service/0.0.0.79
            UserName: Cannot prompt for input in non-interactive mode.

            How can I configure the credentials for this feed?

            Thanks a huge lot

            1 Reply Last reply Reply Quote 0
            • ? This user is from outside of this forum
              Guest
              last edited by

              I am using password from nuget.config.
              And as pointed by Pawel, password is being supplied when calling GET http://nuget.ourCompany.org/nuget/Corporate/Packages(Id='OurPackage',Version='1.0.2')

              but no password is supplied when calling GET http://nuget.ourCompany.org/api/v2/package/Corporate/OurPackage/1.0.2

              Any solutions ? or work arounds.

              FYI: I tried adding adding credentials in packageSourceCredentials for http://nuget.ourCompany.org/api/v2/package/Corporate/ or http://nuget.ourCompany.org/api/v2/

              Still no luck.

              Any help would be great!

              Thanks
              Manish

              1 Reply Last reply Reply Quote 0
              • ? This user is from outside of this forum
                Guest
                last edited by

                This is, unfortunately, a bug in the NuGet client (v2.8.2 has it, as do various others).

                There is no workaround, aside from getting the "CI build" of NuGet tools or using an older version without this bug.

                1 Reply Last reply Reply Quote 0
                • ? This user is from outside of this forum
                  Guest
                  last edited by

                  Thanks Alana. moving back to an older version of Nuget.exe works

                  1 Reply Last reply Reply Quote 0
                  • ? This user is from outside of this forum
                    Guest
                    last edited by

                    I'm having the same problem but reverting to 2.8.1 did not help.

                    1 Reply Last reply Reply Quote 0
                    • ? This user is from outside of this forum
                      Guest
                      last edited by

                      I upgraded ProGet to current 3.4.5 from 3.3.11 and that fixed the problem.

                      1 Reply Last reply Reply Quote 0
                      • ? This user is from outside of this forum
                        Guest
                        last edited by

                        Which older version of nuget works correctly?

                        1 Reply Last reply Reply Quote 0

                        Hello! It looks like you're interested in this conversation, but you don't have an account yet.

                        Getting fed up of having to scroll through the same posts each visit? When you register for an account, you'll always come back to exactly where you were before, and choose to be notified of new replies (either via email, or push notification). You'll also be able to save bookmarks and upvote posts to show your appreciation to other community members.

                        With your input, this post could be even better 💗

                        Register Login
                        • 1 / 1
                        • First post
                          Last post
                        Inedo Website Home • Support Home • Code of Conduct • Forums Guide • Documentation