Push a NuGet package that already exists

Hello,

I am trying to push a package with the same version as one in the server, looking at this link (http://docs.octopusdeploy.com/display/OD/Push+a+NuGet+package+that+already+exists) I added the ?replace=true argument to the url but still get error 400. bad response.

the request will work if the package doesn’t exist in the library already and fail at the second attempt.

Thank you

Him

Thanks for reaching out.

  • Which version of Octopus are you running?

  • Could you show us the full nuget.exe push command you (or your build server) are using? If you are pushing the package from a build, please send the full build log.

Thanks,
Dalmiro

Hi Dalmiro,

Thanks for the reply. This is the nuget.exe command we are using,

nuget.exe push NuGet$NugetpackageID.$version.nupkg -ApiKey [edited] -Source [edited]/nuget/packages?replace=true

Thanks,
Kumar

Hi Kumar,

  • Which version of Octopus are you running? The ?replace feature was added with Octopus 3.2.4 (github issue)

  • Could you share a screenshot of your console after you run the command? Make sure the current command and its result can be seen on it.

Thanks,
Dalmiro

I see…
I got it now. We are using 3.2.2 version. Thank you so much Dalmiro for helping me out.
So we will have to upgrade the Octopus verison.

Thank you,
Kumar

Dalmiro,

I have a question, this is not related to above issue.

in the Octopus we have
number of process = 1
number of channels = 10
and we are using same NuGet package for all the channels.

Can you tell me how can i get my release number in the following format,

Releasenumber = NuGetpackageversion+channelname

for example: I have a nuget package version is 1.1.25
when I create a release on channel A, my release number should be like 1.1.25-ChannelA

Whenever I create a release, my relase number format should be like that. is that possible using any variable or any template??
if yes, can you please help me.

Thanks again.

Hi Kumar,

I see you are already discussing this with Vanessa on another thread . Please continue the conversation about that topic with her over there :slight_smile:

Best regards,
Dalmiro

Sure. Thanks Dalmiro.