tag:help.appveyor.com,2012-11-13:/discussions/problems/31550-nuget-authorization-failingAppVeyor: Discussion 2022-03-02T08:34:34Ztag:help.appveyor.com,2012-11-13:Comment/504045222022-03-01T17:02:11Z2022-03-01T17:02:11ZNuget authorization failing<div><p>There is a bug in .NET SDK: <a href="https://github.com/dotnet/sdk/issues/23498">https://github.com/dotnet/sdk/issues/23498</a></p>
<p>Until it's fixed, as a workaround, add the following command into <code>init</code> section of your <code>appveyor.yml</code>:</p>
<pre>
<code>init:
- del "C:\Program Files\dotnet\sdk\6.0.200\System.Security.Cryptography.ProtectedData.dll"</code>
</pre></div>Feodor Fitsnertag:help.appveyor.com,2012-11-13:Comment/504045222022-03-01T17:56:14Z2022-03-01T17:56:14ZNuget authorization failing<div><p>Thanks for the help. My build uses the UI rather than yml so I added</p>
<p>Remove-Item -Path "C:\Program Files\dotnet\sdk\6.0.200\System.Security.Cryptography.ProtectedData.dll"</p>
<p>to the init script unfortunately that just changed the error from the first decryption one to the second unauthorized one.</p>
<p>However in the link you kindly provided another workaround was to use the -StorePasswordInClearText option when adding the source. This works - as far as I can see that doesn't make the password generally visible? Is it an acceptable temporary workaround ?</p></div>scascarinitag:help.appveyor.com,2012-11-13:Comment/504045222022-03-01T18:23:49Z2022-03-01T18:23:49ZNuget authorization failing<div><p>That works too. Just make sure <code>nuget_password</code> environment variable defined on UI is marked as "secure" ("lock" icon next to it is clicked). Secure variables are masked in build console output if accidentially leaked.</p></div>Feodor Fitsner