What a journey! I am going to document this for the sole reason that I am aware that I will once again need this information only just a few days from now. Problem: I have a nuget package that I want to push to an Azure Artifact directory. I figured easy enough there is some documentation and I tried with the following:
nuget push -source "MyFeed_feed" -apikey az "C:\tfs\Git\MLayout\MLayout\MLayout\bin\Debug\Layout.1.0.0.nupkg"
I did have to download Nuget and ensure it was found when using the above command via command prompt. Once setup, and re-ran I was prompted for username and password. As many times as I tried it would just continue to fail and eventually would timeout. I am sure this worked just a few weeks ago.
Regardless on to plan B, documentation..
1) I downloaded the latest Nuget.exe
2) Download and install the credential provider (this one was a bit more challenging)
I figured I would use the Automatic approach.
a) I downloaded installcredprovider.ps1 from this github location https://github.com/microsoft/artifacts-credprovider/tree/master/helpers (more information can be found here)
d) Now with this installed I retried to push my nuget package with nuget push -source "MyFeed_feed" -apikey az "C:\tfs\Git\MLayout\MLayout\MLayout\bin\Debug\Layout.1.0.0.nupkg"
No go, so I tried with using the vs.net command prompt.
I opened up a command prompt from Windows-Start ensuring to pick the “Developer Command Prompt for VS 2019”
The entire process probably 1 hour of effort, but essentially using the VS.NET 2019 command prompt, download the ps1 for the credprovider, execute using powershell then retry. Finally.