Inedo Community Forums Forums
    • Recent
    • Tags
    • Popular
    • Login
    1. Home
    2. hashim.abu-gellban_3562
    3. Best

    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!

    H Offline
    • Profile
    • Following 0
    • Followers 0
    • Topics 5
    • Posts 13
    • Groups 0

    Posts

    Recent Best Controversial
    • RE: Download/ upload a NuGet package using cmd with ProGet Key or Username/ password

      Hi Alana,

      I found the issue of the url provided from the former forum. It should be "nuget" instead of "feeds", as follows:
      $url = "https://myprogetserver/**nuget**/mynuggets/package/mypackage/1.0.0"

      The complete PowerShell is as follows:

      $user = 'api'
      $pass = 'abcdefg12345'
      $pair = "$($user):$($pass)"
      $encodedCreds = [System.Convert]::ToBase64String([System.Text.Encoding]::ASCII.GetBytes($pair))
      $basicAuthValue = "Basic $encodedCreds"
      $Headers = @{
          Authorization = $basicAuthValue
      }
      
      $url = "https://myprogetserver/nuget/mynuggets/package/mypackage/1.0.0"
      $destination = "c:\mypackages\mypackage-1.0.0.zip"
      Invoke-WebRequest -Uri $url -OutFile $destination -Headers $Headers
      

      Thanks,
      Hashim

      posted in Support
      H
      hashim.abu-gellban_3562
    • 1 / 1