Nexus Repository with Octopus Server

Hello,

I am trying to add a Nexus Repository to my External Feeds. In this repository I have zip files.
I have installed the Nexus Repository locally.
If I try to add the physical path to the external feed (D:\Development\Nexus 2.1\sonatype-work\nexus\storage\thirdparty), I cannot see the zip files.
If I try to add the address to the repository (http://localhost:8081/nexus/content/repositories/thirdparty/) it gives me this error:

“NuGet.Protocol.Core.Types.FatalProtocolException: The V2 feed at ‘http://localhost:8081/nexus/content/repositories/thirdparty/Search()?$filter=IsAbsoluteLatestVersion&searchTerm=’’&targetFramework=’’&includePrerelease=true&$skip=0&$top=10’ returned an unexpected status code ‘404 Not Found’.
at NuGet.Protocol.V2FeedParser.<>c__DisplayClass51_0.<b__1>d.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.HttpSource.d__14`1.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.V2FeedParser.d__51.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.V2FeedParser.d__50.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.V2FeedParser.d__44.MoveNext()
— End of stack trace from previous location where exception was thrown —
at System.Runtime.CompilerServices.TaskAwaiter.ThrowForNonSuccess(Task task)
at System.Runtime.CompilerServices.TaskAwaiter.HandleNonSuccessAndDebuggerNotification(Task task)
at NuGet.Protocol.PackageSearchResourceV2Feed.d__4.MoveNext()”

Could you please tell me how can I add my Nexus Repository to the Octopus in order to retrieve the packages that I need ?

Thank you

Hello Sebi,

Thanks for getting in touch. External feeds in Octopus Deploy only support packages that are have the extension .nupkg that’s because it’s designed to read from a NuGet style feeds like; Nuget.org, MyGet.org or other systems that produce nuget feeds and a file system directory as an alternative.

You’ve mentioned your physical path contains just zip files, in that case external feeds will not find them because it only supports nupkg files.

From the error you got it looks like the Nexus API is not publishing the packages in expected format: a NuGet style feed.

To get your packages into Octopus Deploy you can use Octo.exe, which does support zip files see documenation here: https://octopus.com/docs/api-and-integration/octo.exe-command-line/pushing-packages

As for zip files and Nexus:
We have a uservoice feature request to support zip files that has a few votes, you could help us out by voting for it and providing details of how Nexus names the files. In the same uservoice item if you could share details of what that API endpoint feed looks like from Nexus, it would also help us in supporting Nexus in a first class way too sometime in the future.

Best Regards,
Nick

Hi Nick,

Thanks for your reply.
Unfortunately, the problem that I have is that I really need to use this Nexus repository and it has to store zip files. I have already successfully deployed a zip file with the help of Octo.exe but I wanted to see if I can somehow take the zip files from Nexus and have them in Octopus.

Thank you for your help.

Have a nice day,
Sebastian