405 (Method Not Allowed). when pushing nuget packages

I am unable to push nuget packages from the command line. When I send the following command:

“C:\Projects\Service\packages\OctoPack.3.4.7\tools\NuGet.exe” push “Web.API.1773.nupkg” -ApiKey API-KEY***** -Source http://deploy/api/packages

I get this error:

Pushing Web.API.1773.nupkg to ‘http://deploy/api/packages’…
PUT http://deploy/api/packages/
MethodNotAllowed http://deploy/api/packages/ 1663ms
Response status code does not indicate success: 405 (Method Not Allowed).

Please explain what is causing this and how to fix it.


Thanks for reaching out. Are you trying to push the package to the Octopus built-in directory? Because if that’s the case, then the URL should be http://deploy/nuget/packages instead.

You can always check the right URL from the web portal under Library -> Packages.