I have been trying to push the nuget packet using Invoke-WebRequest post method but I am getting authentication errors even though I am using right api key. Can you please help me to solve this issue. Here is the cmdlet I have been trying.
we are feeling like nuget.exe taking considerable time to push the packets and trying to implement invoke-webrequest post using inbuilt octopus API’s in the hope of time taking might come down. All other scripts we have implemented are in powershell, so we want to use powershell for this one as well. Is it possible to get powershell script for this operation?
In Octopus 3.3 you’ll also be able to push packages using the following powershell snippet
$url = "http://OctopusServer/api/packages/raw?apiKey=API-OCTOPUSUSERAPIKEY"
$filePath = "C:\PathToFile\AspNetCoreWebApp.1.0.0.zip" #this could also be a .nupkg
$wc = new-object System.Net.WebClient