Paket icon indicating copy to clipboard operation
Paket copied to clipboard

add-credentials fails

Open haf opened this issue 5 years ago • 6 comments

Description

$ .paket/paket config add-credentials https://nuget.pkg.github.com/haf/index.json
Paket version 5.241.5
Username: haf
Password: ****************************************
Authentication type (basic|ntlm, default = basic): basic
Performance:
 - Runtime: 3 seconds
Paket failed with
-> PlatformNotSupportedException: Windows Data Protection API (DPAPI) is not supported on this platform.

Repro steps

See above

  • macOS
  • .net core version of paket
  • .net core 3.0 and 3.1 SDK variant

Expected behavior

Not use NTLM code

Actual behavior

Uses NTLM code

Known workarounds

None

haf avatar Jan 02 '20 23:01 haf

Since the DPAPI is never going to work with .NET Core, I think paket should add support for cleartext passwords, eg.:

paket config --cleartext add-credentials https://pkgs.dev.azure.com/myorg/_packaging/myfeed/nuget/v3/index.json
paket config --cleartext add-credentials https://pkgs.dev.azure.com/myorg/_packaging/myfeed/nuget/v2
<?xml version="1.0" encoding="utf-8"?>
<configuration>
  <credentials>
    <credential source="https://pkgs.dev.azure.com/myorg/_packaging/myfeed/nuget/v3/index.json" username="PAT" cleartext="personal-access-token" authType="basic" />
    <credential source="https://pkgs.dev.azure.com/myorg/_packaging/myfeed/nuget/v2" username="PAT" cleartext="personal-access-token" authType="basic" />
  </credentials>
</configuration>

This would enable pushing packages from CI.

peterhirn avatar Jan 16 '20 12:01 peterhirn

  • it's a duplicate of #3462
  • sad that it doesn't work on mac and linux
  • the only workaround was for me to use credentials in the environment variables
    • documented here: http://fsprojects.github.io/Paket/nuget-dependencies.html#NuGet-feeds
    • example: source https://fiz-baz.com/artifactory/api/nuget/our-corp-nuget username: "%REPOSITORY_USER%" password: "%REPOSITORY_USER_PASS%"

vilinski avatar May 26 '20 17:05 vilinski

Hi, I will be trying to fix this.

bengobeil avatar Jul 21 '20 14:07 bengobeil

Would it be acceptable to use AES instead of DPAPI for password encryption? @forki

bengobeil avatar Jul 21 '20 15:07 bengobeil

Guess so.

Benjamin Gobeil [email protected] schrieb am Di., 21. Juli 2020, 17:31:

Would it be acceptable to use AES instead of DPAPI for password encryption? @forki https://github.com/forki

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/fsprojects/Paket/issues/3768#issuecomment-661932326, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAOANGBRGJYTTRXKOZVPQ3R4WYGDANCNFSM4KCHVLJA .

forki avatar Jul 22 '20 04:07 forki

This looks like its resolved right? Can this issue be closed?

bradcypert avatar Oct 01 '23 02:10 bradcypert