Cannot push to internal nuget packages directory

Hi,

Brand new install, first time I’ve done this, and all is good except I can’t push a nupkg from msbuild to the internal nuget packages section on the server. I can upload the package from the page but not push?

NuGet.exe push package.nupkg -s http://:/nuget/packages

System.Net.WebException: Unable to connect to the remote server ---> System.Net.Sockets.SocketException: A connection attempt failed because the connected party did not properly respond after a period of time, or established connection failed because connected host has failed to respond <ip>:<port> at System.Net.Sockets.Socket.DoConnect(EndPoint endPointSnapshot, SocketAddress socketAddress) at System.Net.ServicePoint.ConnectSocketInternal(Boolean connectFailure, Socket s4, Socket s6, Socket& socket, IPAddress& address, ConnectSocketState state,IAsyncResult asyncResult, Exception& exception) --- End of inner exception stack trace --- at System.Net.HttpWebRequest.GetResponse() at NuGet.RequestHelper.GetResponse() at NuGet.HttpClient.GetResponse() at NuGet.RedirectedHttpClient.GetResponseUri(HttpClient client) at NuGet.RedirectedHttpClient.EnsureClient() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at NuGet.MemoryCache.GetOrAdd[T](Object cacheKey, Func1 factory, TimeSpan expiration, Boolean absoluteExpiration) at NuGet.RedirectedHttpClient.get_CachedClient() at NuGet.RedirectedHttpClient.get_Uri() at NuGet.PackageServer.ResolveBaseUrl() at System.Lazy1.CreateValue()
at System.Lazy1.LazyInitValue() at System.Lazy1.get_Value()
at NuGet.PackageServer.GetClient(String path, String method, String contentType)
at NuGet.PackageServer.PushPackageToServer(String apiKey, Func1 packageStreamFactory, Int64 packageSize, Int32 timeout, Boolean disableBuffering) at NuGet.PackageServer.PushPackage(String apiKey, IPackage package, Int64 packageSize, Int32 timeout, Boolean disableBuffering) at NuGet.Commands.PushCommand.PushPackageCore(String source, String apiKey, PackageServer packageServer, String packageToPush, TimeSpan timeout) at NuGet.Commands.PushCommand.PushPackage(String packagePath, String source,String apiKey, TimeSpan timeout) at NuGet.Commands.PushCommand.ExecuteCommand() at NuGet.Commands.Command.Execute() at NuGet.Program.Main(String[] args)

Any hints would be awesome

Mark

Hi Mark,

Thanks for getting in touch! The only thing I can think of here is you are trying to push from somewhere that cannot access that address, thus the connection attempt failure.
Are you able to connect to the Octopus Manager on the machine that is trying to push?

Let me know what you find.
Vanessa

I can indeed and also upload the same package via the web page from the machine I’m attempting to push from

Mark

Hi Mark,

Thanks for the extra detail. Another thought is if you use a proxy, that NuGet command is not, and will not be able to get through.

Vanessa