Error when trying to push to Octopus using Team Build 2017

==============================================================================
Task : Push Package(s) to Octopus
Description : Push your NuGet or Zip package to your Octopus Deploy Server
Version : 2.0.75
Author : Octopus Deploy
Help : Version: 2.0.75. More Information

“F:\Agent_work_tasks\OctopusPush_d05ad9a2-5d9e-4a1c-a887-14034334d6f2\2.0.75\Octo.exe” push --server=http:///nuget/packages --apiKey=******** --package=“F:\Agent_work\3\a\packages\Test.1.0.0.4.nupkg”
Octopus Deploy Command Line Tool, version 4.13.11

The resource you requested was not found.
Error from Octopus server (HTTP 404 NotFound)
Exit code: -7

Process ‘Octo.exe’ exited with code ‘-7’.

Any ideas on what this means? The Octopus server is running.

octopus_server.png

Update: I changed the URL and now I’m getting a different error:

017-06-07T20:02:48.0342484Z ##[section]Starting: Push Packages to Octopus
2017-06-07T20:02:48.0342484Z ==============================================================================
2017-06-07T20:02:48.0342484Z Task : Push Package(s) to Octopus
2017-06-07T20:02:48.0342484Z Description : Push your NuGet or Zip package to your Octopus Deploy Server
2017-06-07T20:02:48.0342484Z Version : 2.0.75
2017-06-07T20:02:48.0342484Z Author : Octopus Deploy
2017-06-07T20:02:48.0342484Z Help : Version: 2.0.75. More Information
2017-06-07T20:02:48.0342484Z ==============================================================================
2017-06-07T20:02:48.9367251Z ##[command]“F:\Agent_work_tasks\OctopusPush_d05ad9a2-5d9e-4a1c-a887-14034334d6f2\2.0.75\Octo.exe” push --server=http://test.releasebuild.com/ --apiKey=******** --package="F:\Agent_work\3\a\packages\Test.1.0.0.6.nupkg"
2017-06-07T20:02:49.0304757Z Octopus Deploy Command Line Tool, version 4.13.11
2017-06-07T20:02:49.0304757Z
2017-06-07T20:02:49.4054784Z Handshaking with Octopus server: http://test.releasebuild.com/
2017-06-07T20:02:49.4054784Z Handshake successful. Octopus version: 3.3.2; API version: 3.0.0
2017-06-07T20:02:49.4367293Z Authenticated as: myaccount <>
2017-06-07T20:02:49.4367293Z Pushing package: F:\Agent_work\3\a\packages\Test.1.0.0.6.nupkg…
2017-06-07T20:02:49.6711229Z Octopus Server returned an error: Illegal characters in path.
2017-06-07T20:02:49.6711229Z Server exception:
2017-06-07T20:02:49.6711229Z System.ArgumentException: Illegal characters in path.
2017-06-07T20:02:49.6711229Z at System.IO.Path.CheckInvalidPathChars(String path, Boolean checkAdditional)
2017-06-07T20:02:49.6711229Z at System.IO.FileStream.Init(String path, FileMode mode, FileAccess access, Int32 rights, Boolean useRights, FileShare share, Int32 bufferSize, FileOptions options, SECURITY_ATTRIBUTES secAttrs, String msgPath, Boolean bFromProxy, Boolean useLongPath, Boolean checkHost)
2017-06-07T20:02:49.6711229Z at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share, Int32 bufferSize, FileOptions options, String msgPath, Boolean bFromProxy)
2017-06-07T20:02:49.6711229Z at System.IO.FileStream…ctor(String path, FileMode mode, FileAccess access, FileShare share)
2017-06-07T20:02:49.6711229Z at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileMode mode, FileAccess access, FileShare share) in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 184
2017-06-07T20:02:49.6711229Z at Octopus.Shared.Util.OctopusPhysicalFileSystem.OpenFile(String path, FileAccess access, FileShare share) in Y:\work\refs\tags\3.3.2\source\Octopus.Shared\Util\OctopusPhysicalFileSystem.cs:line 177
2017-06-07T20:02:49.6711229Z at Octopus.Server.Web.Api.NuGet.PackagePushActionBase1.SaveToTemporaryLocation(HttpFile packageFile) in Y:\work\refs\tags\3.3.2\source\Octopus.Server\Web\Api\NuGet\PackagePushActionBase.cs:line 117 2017-06-07T20:02:49.6711229Z at Octopus.Server.Web.Api.NuGet.PackagePushActionBase1.Execute() in Y:\work\refs\tags\3.3.2\source\Octopus.Server\Web\Api\NuGet\PackagePushActionBase.cs:line 58
2017-06-07T20:02:49.6711229Z at Octopus.Server.Web.Infrastructure.Api.Responder1.Respond(TDescriptor options, NancyContext context) in Y:\work\refs\tags\3.3.2\source\Octopus.Server\Web\Infrastructure\Api\Responder.cs:line 162 2017-06-07T20:02:49.6711229Z at System.Dynamic.UpdateDelegates.UpdateAndExecute3[T0,T1,T2,TRet](CallSite site, T0 arg0, T1 arg1, T2 arg2) 2017-06-07T20:02:49.6711229Z at CallSite.Target(Closure , CallSite , Object , Object , NancyContext ) 2017-06-07T20:02:49.6711229Z at Octopus.Server.Web.Api.OctopusRestApiModule.<>c__DisplayClass0_0.<.ctor>b__0(Object o) in Y:\work\refs\tags\3.3.2\source\Octopus.Server\Web\Api\OctopusRestApiModule.cs:line 46 2017-06-07T20:02:49.6711229Z at CallSite.Target(Closure , CallSite , Func2 , Object )
2017-06-07T20:02:49.6711229Z at Nancy.Routing.Route.<>c__DisplayClass4.b__3(Object parameters, CancellationToken context)
2017-06-07T20:02:49.6711229Z -----------------------
2017-06-07T20:02:49.6711229Z
2017-06-07T20:02:49.6711229Z Error from Octopus server (HTTP 500 InternalServerError)
2017-06-07T20:02:49.6711229Z Exit code: -7
2017-06-07T20:02:49.8273570Z ##[error]Process ‘Octo.exe’ exited with code ‘-7’.

Hi Ray,

Thank you for getting in touch. It looks like you have run into this issue. The current VSTS steps use NuGet 3.5 under the hood, causing this error. Are you able to update your Octopus Server to 3.3.11 or preferably the latest?

If not, you should be able to use the NuGet Publisher VSTS step and choose Nuget 3.3 in the advanced options. Alternatively you can download the Octo.exe (OctopusTools) from the 3.3.2 download page and use that to push the package. The command line is in the the log you provided.

Hope that helps,

Robert W

Hi Robert W,

Thank you for the reply, I was able to publish using the NuGet Publisher.

For anyone encountering this problem the sample.png is what I did to make it work in my environment.