'Password decryption not supported on .NET Core for Windows?

I recently converted a private NuGet repository to require authentication.

To build a project that uses that repository, I added the authentication to the local NuGet.Config with NuGet Sources add -name [repo_name] -Source [source_url] -UserName [username] -Password [password].

I now get the following error when I try running dotnet restore:

Password decryption is not supported on .NET Core for this platform. The following feed uses an encrypted password: 'nuget-sdet'. You can use a clear text password as a workaround.

I know that this isn't supported on linux, but I'm running this on Windows Server 2012 R2.

This is running on a very old version of .NET Core: 1.0.0-preview2-003121.

Is password decryption supported on Windows for newer versions of .NET Core?

Or am I stuck between either storing the password in clear text or re-enabling anonymous access to the feed?



Solution 1:[1]

In non windows OS you should add the suffix of --store-password-in-clear-text to your add command.

As specified in the dotnet nuget add source article here

--store-password-in-clear-text

Enables storing portable package source credentials by disabling password encryption.

Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source
Solution 1 Yair