Encrypted nuget credentials

0 Answers 14 Views
General Discussions
Martin
Top achievements
Rank 1
Iron
Martin asked on 13 Jun 2022, 01:18 PM

How do I get the encrypted credentials for my account?

And how do I make it work?
Previously one guy tried to do it and failed, so now I'm going in for a new attempt. Clean slate.

This is what the config looks like right now (without username and password) :

<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <solution>
    <add key="disableSourceControlIntegration" value="true" />
  </solution>
  <packageSources>
    <add key="nuget.telerik.com" value="https://nuget.telerik.com/v3/index.json" />
  </packageSources>
  <packageSourceCredentials>
    <nuget.telerik.com>
      <add key="Username" value="myemail" />
      <add key="ClearTextPassword" value="mypassword" />
    </nuget.telerik.com>
  </packageSourceCredentials>
</configuration>
Martin
Top achievements
Rank 1
Iron
commented on 13 Jun 2022, 02:04 PM

If it's not possible then that's that.
But it would be preferable to not have them in plaintext...
Anton Mironov
Telerik team
commented on 16 Jun 2022, 12:54 PM

Hi Martin,

Thank you for the details provided.

In order to encrypt automatically, try the following commands:

dotnet nuget add source "https://nuget.telerik.com/v3/index.json" --name "nuget.telerik.com" --username {{username}} --password {{password}}



nuget sources add -Name "nuget.telerik.com" -Source "https://nuget.telerik.com/v3/index.json" -UserName {{username}} -Password {{password}}

Use the snippets above depending on the usage of dotnet CLI or nuget.exe.

The following articles are representing both the pointed approaches:

Give a try the approaches above and let me know if further assistance or information is needed.


Kind Regards,
Anton Mironov

No answers yet. Maybe you can help?

Tags
General Discussions
Asked by
Martin
Top achievements
Rank 1
Iron
Share this question
or