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!

    Authentication and Publish Powershell Modules to Powershell Feed

    Scheduled Pinned Locked Moved Support
    authenticationprogetpowershell
    4 Posts 1 Posters 125 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

      Hello,

      I'd like to know how to proceed in order to publish a simple powershell module to my Proget server that has a Powershell feed named "BpPoshGallery" configured. I'm using version 4.11 of Proget.

      The server is setup to use the integrated user directory, so I have an user "foo" that has permissions to publish packages. Feed scoping is not being used.

      When I run the following command inside my local module folder (containing the psm1 and psd1 files):

      Publish-Module -Repository BpPoshGallery -Path . -NuGetApiKey "foo:bar"

      And I get the following error:

      Publish-PSArtifactUtility : Failed to publish module 'BraspagDev': 'Cannot prompt for input in non-interactive mode.
      '.
      At C:\Program Files\WindowsPowerShell\Modules\PowerShellGet\1.0.0.1\PSModule.psm1:853 char:17

      •             Publish-PSArtifactUtility -PSModuleInfo $moduleInfo `
        
      •             ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
        
        • CategoryInfo : InvalidOperation: (:) [Write-Error], WriteErrorException
        • FullyQualifiedErrorId : FailedToPublishTheModule,Publish-PSArtifactUtility

      Product: ProGet
      Version: 4.1.3

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

        Publish-Module uses nuget.exe behind the scenes, so basically you need to configure nuget to allow for this. There are several ways to do this.

        If you search for the error cannot prompt for input in non-interactive mode you should see a lot of suggestions, depending on the version used, but here is a good starting resource:

        http://robinosborne.co.uk/2014/09/15/nuget-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

          Alana,

          Actually I have found that the issue is related to more than one cause. First, OneGet (PackageManagement - Powershell on windows) is not very mature yet.

          It doesn't support corporate proxy authentication, one must configure the powershell session and/or profile to use the default proxy credentials:

          $browser = New-Object System.Net.WebClient
          $browser.Proxy.Credentials =[System.Net.CredentialCache]::DefaultNetworkCredentials
          

          And then, OneGet doesn't go well with private/authenticated feeds. It is hard to add package sources and/or manipulate packages that belong to a private feed. I have just dropped it for now and I'll distribute modules manually instead, and wait for OneGet to be more mature and support private feeds.

          Thanks,

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

            i updated to PowerShellGet 1.1.1.0 and it solved my issues.

            Release Notes

            • PowerShellCore support
            • Security enhancements including the enforcement of catalog-signed modules during installation
              - Authenticated Repository support
            • Proxy Authentication support
            • Responses to a number of user requests and issues
            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