TeamCity OctopusDeploy Push Packages 404

I have successfully added the Octopus.TeamCity plugin (3.3.16) into my TeamCity install (9.1.7) and have enabled Run OctoPack in the Visual Studio build step and I can see the created .nupkg in the build output folder.

I’m now trying to push that package into Octopus Deploy, I’ve added the OctopusDeploy Push Packages step and used the URL shown in Octopus Deploy -> Library -> Package but the Octo.exe step is getting a 404 error:

[10:31:27]Step 4/4: OctopusDeploy: Push packages (1s)
[10:31:27][Step 4/4] Octopus Deploy
[10:31:27][Octopus Deploy] Running command: octo.exe push --server http://buld01:8080/nuget/packages --apikey SECRET --package C:\TeamCity\buildAgent\work\a8b36c2abfafad7a\BackBone.Host\bin\Release\BackBone.Host.1.0.0.643.nupkg
[10:31:27][Octopus Deploy] Pushing packages to Octopus server
[10:31:28][Octopus Deploy] Octopus Deploy Command Line Tool, version 3.3.16+Branch.master.Sha.47e0e502fcd994db2415887dc3bf8b3f248962a7
[10:31:28][Octopus Deploy]
[10:31:28][Octopus Deploy] Handshaking with Octopus server: http://buld01:8080/nuget/packages
[10:31:28][Octopus Deploy] Error from Octopus server (HTTP 404): The resource you requested was not found.
[10:31:28][Octopus Deploy] Exit code: -7
[10:31:28][Octopus Deploy] Octo.exe exit code: -7
[10:31:28][Step 4/4] Unable to create or deploy release. Please check the build log for details on the error.
[10:31:28][Step 4/4] Step OctopusDeploy: Push packages failed

Running the Octo.exe command from the command line on the build server fails for the same reason, however if I run the equivalent on the build server using NuGet.exe it succeeds:

C:\TeamCity\buildAgent\tools\NuGet.CommandLine.3.4.3\tools>NuGet.exe push c:\TeamCity\buildAgent\work\a8b36c2abfafad7a\BackBone.Host\bin\Release\BackBone.Host.1.0.0.643.nupkg -ApiKey SECRET -Source http://buld01:8080/nuget/packages
Pushing BackBone.Host.1.0.0.643.nupkg to ‘http://buld01:8080/nuget/package
s’…
PUT http://buld01:8080/nuget/packages/
Created http://buld01:8080/nuget/packages/ 1014ms
Your package was pushed.

Any ideas what could cause that? I’d rather use the Octopus plugin to upload the package than running a command line task to automate nuget.exe if possible…

Hi Trevor,

Thanks for reaching out. Could you please send the full TeamCity Log so we can take a look at what’s going on?

Thanks,
Dalmiro

Hi,

I changed the URL in TeamCity to just be http://buld01:8080 and it’s working now so I suspect the TeamCity plugin just wanted the “root” URL and was appending /nuget/packages.

Hi Trevor,

That’s totally right! I should have noticed that in your first reply.

Glad to hear you figured it out :slight_smile:

Cheers,
Dalmiro

@Dalmiro - you can close this if you want