Using the built-in NuGet repository

Hi,

Is it possible to use the built-in NuGet server of Octopus also to retrieve packages?

I tried:
nuget.exe list API-KEY -Source http://localhost:8095/nuget/packages

And got:
The remote server returned an error: (405) Method Not Allowed.

Can I configure it to be used as a ‘normal’ NuGet-server or is this not possible?

Thanks.

Hi,

Thanks for getting in touch. The built-in NuGet server is write-only and cannot be browsed from anywhere but the Octopus interfaces. It is not possible to modify this.

Thanks,

Dalmiro.

Using the following PowerShell script, I was able to list out all the packages

$WebClient = New-Object System.Net.WebClient

$WebClient.UseDefaultCredentials = $true # if you’re using integrated authentication

$WebClient.Headers.Add(“X-Octopus-ApiKey”, “”)

$package = $WebClient.DownloadString(“http://deploy.del.wa.gov:81/api/packages”) | ConvertFrom-Json

For a specific package, you can specify the PackageId as a querystring parameter

$WebClient = New-Object System.Net.WebClient

$WebClient.UseDefaultCredentials = $true # if you’re using integrated authentication

$WebClient.Headers.Add(“X-Octopus-ApiKey”, “”)

$package = $WebClient.DownloadString(“http://deploy.del.wa.gov:81/api/packages?nuGetPackageId=”) | ConvertFrom-Json