Error (400) from Octopus using ProGet Community Edition feed

I have been successful in configuring a build/deploy process to push packages to a ProGet server. However, when adding the feed, I enter the username and password combination (and also left blank) the test fails with an error 400. The step using this feed also fails. Here is the output I can see from OctopusDeploy when trying the URL directly it is using for the test (http://hostname/api/feeds/feeds-proget/packages?partialMatch=true&take=10):

“ErrorMessage”: “The remote server returned an error: (400) Bad Request.”,
“FullException”: “System.Net.WebException: The remote server returned an error: (400) Bad Request.\r\n at System.Net.HttpWebRequest.GetResponse()\r\n at NuGet.RequestHelper.GetResponse()\r\n at NuGet.RedirectedHttpClient.GetResponseUri(HttpClient client)\r\n at NuGet.RedirectedHttpClient.EnsureClient()\r\n at System.Lazy1.CreateValue()\r\n at System.Lazy1.LazyInitValue()\r\n at NuGet.RedirectedHttpClient.get_CachedClient()\r\n at NuGet.RedirectedHttpClient.get_Uri()\r\n at NuGet.DataServicePackageRepository.GetPackages()\r\n at Octopus.Server.Web.Api.Actions.PackageSearchAction.SearchForPackagesNamedLike(IPackageRepository repository, String packageId, Int32 take) in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Actions\PackageSearchAction.cs:line 124\r\n at Octopus.Server.Web.Api.Actions.PackageSearchAction.Search(String feedId, String packageId, Boolean partialMatch, Boolean includeMultipleVersions, Boolean includeNotes, Boolean includePreRelease, Int32 take) in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Actions\PackageSearchAction.cs:line 58\r\n at Octopus.Server.Web.Api.Actions.PackageSearchAction.Execute() in y:\work\refs\heads\master\source\Octopus.Server\Web\Api\Actions\PackageSearchAction.cs:line 41\r\n at Octopus.Platform.Web.Api.Responder1.Respond(TDescriptor options, NancyContext context) in y:\\work\\refs\\heads\\master\\source\\Octopus.Platform.Web\\Api\\Responder.cs:line 163\r\n at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2)\r\n at CallSite.Target(Closure , CallSite , Object , Object , NancyContext )\r\n at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass5.<.ctor>b__2(Object o) in y:\\work\\refs\\heads\\master\\source\\Octopus.Server\\Web\\Api\\OctopusRestApiModule.cs:line 47\r\n at CallSite.Target(Closure , CallSite , Func2 , Object )\r\n at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)”

Hi Antone,

Thanks for getting in touch! Can you provide a screenshot of your feeds page? Generally this error occurs when you provide a bad URL to your feed server that is too low or too high a directory level or includes a package name.


You were correct! I was using the web UI’s feeds URL which is different than the actual NuGet URL.

should be:

Now it’s talking as expected. Thank you for pointing me in the right direction.