Navigation

    Inedo Community Forums

    Forums

    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    1. Home
    2. hashim.abu-gellban_3562
    3. Best
    H
    • Profile
    • Following
    • Followers
    • Topics
    • Posts
    • Best
    • Groups

    Best posts made by hashim.abu-gellban_3562

    • 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