3

i have run this command

.\.paket\paket.exe push url "[ip]" file "bin" apikey "jenkins:jenkins" endpoint "/nuget/dev"

Im getting some thing

Pushing package bin to http://[ip]/nuget/dev - trial 1
Could not push bin: The remote server returned an error: (400) Bad Request.

but i can access the server through the browser. Where did I went wrong and How push my packages nuget server

  • 2
    I've had this happen when a package with the same name and version number already existed in the nuget repository. – Diana Ionita Jan 08 '16 at 11:34
  • HTTP 400 responses are logged in the ProGet error log so you can investigate further. Additionally, the error message itself is returned in the HTTP status description, which may or may not be reported by a client (NuGet does in some versions, and I can't say whether paket does or not). You can however capture the traffic with a proxy like Fiddler if you want to check it that way. – John Rasch Jan 08 '16 at 15:16
  • Thanks . Diana Ionita and John Rasch to taking your valueble time to help me :) – Ashan Ratnayake Jan 10 '16 at 09:08
  • 1
    @Diana Ionita has the solution. I tried to post it with a link as a full answer, but Machavity deleted it. "This will happen if you try to push the same version number more than once. https://alastaircrabtree.com/400-bad-request-when-pushing-a-package-to-octopus-deploy-using-nuget-push/" I found it helpful; You or the OP should add it – CrazyPyro Sep 10 '20 at 19:33

2 Answers2

2

This can happen when a package with the same name and version number already exists in the nuget repository.

This was initially a comment on the question, but some people have found this to be the solution, so I'm adding here.

Diana Ionita
  • 3,251
  • 3
  • 27
  • 42
0

I found the issue the file should be nuget package file. to get that file we need to do a nuget build and get that nuget package file in my case that file was created in bin path and gave the path to that file in "file" parameter.