Hi,
Sorry if this has already been posted - I searched but couldn’t find this exact error.
I’m running OctoPack on the same server that Octopus Deploy is running on, like so:
msbuild /t:Restore;Build "someproject.csproj" /m /p:Configuration=Release;Platform=x64;useenv=true /p:RunOctoPack=true;OctoPackEnforceAddingFiles=true /p:OctoPackPublishPackageToHttp=localhost:8888/nuget/packages;OctoPackPublishApiKey=<API key>
The error is:
The command ""C:\Users\LocNetworkService\.nuget\packages\octopack\3.6.3\build\nuget.exe" push "m:\workspace\Localeze_OctopusBuild\MAIN\src\product\webapp\SMBPortal\obj\octopacked\SMBPortal.1.0.0.0.nupkg" **** -Source localhost:8888/nuget/packages " exited with code 1.
So I ran it with just NuGet:
nuget push <package>.nupkg -ApiKey <API key> -Source localhost:8888/nuget/packages -verbosity detailed
And I got this error:
NuGet Version: 4.6.2.5055
Pushing SMBPortal.1.0.0.0.nupkg to 'localhost:8888/nuget/packages'...
System.NullReferenceException: Object reference not set to an instance of an object.
at NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageToServer>d__18.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 NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackageCore>d__15.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 NuGet.Protocol.Core.Types.PackageUpdateResource.<PushPackage>d__14.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 NuGet.Protocol.Core.Types.PackageUpdateResource.<Push>d__10.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 NuGet.Commands.PushRunner.<Run>d__0.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 NuGet.CommandLine.PushCommand.<ExecuteCommandAsync>d__28.MoveNext()
I’m pretty lost. We have a proxy, but this is on the same server. Using p:OctoPackPublishPackageToFileShare
works just fine. What am I missing? Thanks!
Lawrence