Unable to find "Github Packages" Nuget Feed packages

I’m trying to setup “Github Packages (nuget.pkg.github.com)” as feed in Octopus for our nuget packages. For some reason it fails as soon as I try to search with the following two errors:

Unhandled error on request: http://###.com/deploy/api/Spaces-1/feeds/Feeds-1001/packages/search?term=s&take=11&skip=0 f1ba4e2dd59446e4ad0fcfb3b88dad37 by <anonymous> : Operation is not valid due to the current state of the object. System.InvalidOperationException: Operation is not valid due to the current state of the object.
   at Octopus.Core.Packages.GitHub.GitHubEndpointProxy.Search(String query, Int32 skip, Int32 take, CancellationToken cancellationToken) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Core\Packages\GitHub\GitHubEndpointProxy.cs:line 277
   at Octopus.Core.Packages.GitHub.GitHubPackageFeed.SearchPackages(String term, CancellationToken cancellationToken, Int32& total, Int32 skip, Int32 take) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Core\Packages\GitHub\GitHubPackageFeed.cs:line 63
   at Octopus.Server.Web.Api.Actions.PackageSearchAction.ExecuteRegistered() in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Api\Actions\PackageSearchAction.cs:line 49
   at Octopus.Server.Web.Infrastructure.Api.CustomResponder`1.Respond(TDescriptor options, NancyContext context) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\Api\CustomResponder.cs:line 297
   at Octopus.Server.Web.Infrastructure.OctopusNancyModule.<>c__DisplayClass14_0.<get_Routes>b__1(Object o, CancellationToken x) in C:\buildAgent\work\b3c6a5d449cb5fde\source\Octopus.Server\Web\Infrastructure\OctopusNancyModule.cs:line 125
   at Nancy.Routing.Route`1.<Invoke>d__7.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Nancy.Routing.DefaultRouteInvoker.<Invoke>d__2.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Nancy.Routing.DefaultRequestDispatcher.<Dispatch>d__5.MoveNext()
--- End of stack trace from previous location where exception was thrown ---
   at System.Runtime.ExceptionServices.ExceptionDispatchInfo.Throw()
   at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
   at Nancy.NancyEngine.<InvokeRequestLifeCycle>d__22.MoveNext()

and

Error performing request to https://nuget.pkg.github.com/sportingsolutions/search/repositories?q=s&page=1&per_page=11
404 

What am I missing here?

Kind Regards,
Christo

Hi Christo,

Thank you for reaching out to us with your NuGet query.

The snippet Octopus.Core.Packages.GitHub.GitHubPackageFeed suggests that you might be using the “GitHub as a feed” feature which allows you to use GitHub repositories as a package feed:

However, in your post you mention GitHub Packages, which appears to be an extra service offered by GitHub which presents a standard NuGet feed. If you are using this service you’d need to configure it as a NuGet repository instead:

Can you please advise if this is the case and, if so, does using the NuGet approach solve the issue?

Best Regards,

Charles

This topic was automatically closed 31 days after the last reply. New replies are no longer allowed.