microsoft/artifacts-keyring

Keyring failed at wsl

Closed this issue · 6 comments

Environment

Windows 2004, WSL2, Ubuntu 20.04, python3.8

How to reproduce

(virtual) ➜  ~pip install keyring artifacts-keyring
Collecting keyring
  Downloading keyring-21.2.1-py3-none-any.whl (31 kB)
Collecting artifacts-keyring
  Using cached artifacts_keyring-0.2.9-py2.py3-none-any.whl (4.8 MB)
Collecting jeepney>=0.4.2; sys_platform == "linux"
  Downloading jeepney-0.4.3-py3-none-any.whl (21 kB)
Collecting SecretStorage>=3; sys_platform == "linux"
  Downloading SecretStorage-3.1.2-py3-none-any.whl (14 kB)
Collecting dotnetcore2; sys_platform != "win32" and python_version >= "3.0"
  Using cached dotnetcore2-2.1.14-py3-none-manylinux1_x86_64.whl (29.3 MB)
Collecting requests>=2.20.0
  Downloading requests-2.23.0-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 519 kB/s
Collecting cryptography
  Downloading cryptography-2.9.2-cp35-abi3-manylinux2010_x86_64.whl (2.7 MB)
     |████████████████████████████████| 2.7 MB 1.0 MB/s
Collecting distro>=1.2.0
  Using cached distro-1.5.0-py2.py3-none-any.whl (18 kB)
Collecting idna<3,>=2.5
  Downloading idna-2.9-py2.py3-none-any.whl (58 kB)
     |████████████████████████████████| 58 kB 3.8 MB/s
Collecting chardet<4,>=3.0.2
  Downloading chardet-3.0.4-py2.py3-none-any.whl (133 kB)
     |████████████████████████████████| 133 kB 24.4 MB/s
Collecting urllib3!=1.25.0,!=1.25.1,<1.26,>=1.21.1
  Downloading urllib3-1.25.9-py2.py3-none-any.whl (126 kB)
     |████████████████████████████████| 126 kB 19.0 MB/s
Collecting certifi>=2017.4.17
  Downloading certifi-2020.4.5.2-py2.py3-none-any.whl (157 kB)
     |████████████████████████████████| 157 kB 21.0 MB/s
Collecting cffi!=1.11.3,>=1.8
  Downloading cffi-1.14.0-cp38-cp38-manylinux1_x86_64.whl (409 kB)
     |████████████████████████████████| 409 kB 30.2 MB/s
Collecting six>=1.4.1
  Downloading six-1.15.0-py2.py3-none-any.whl (10 kB)
Collecting pycparser
  Downloading pycparser-2.20-py2.py3-none-any.whl (112 kB)
     |████████████████████████████████| 112 kB 29.0 MB/s
Installing collected packages: jeepney, pycparser, cffi, six, cryptography, SecretStorage, keyring, distro, dotnetcore2, idna, chardet, urllib3, certifi, requests, artifacts-keyring
Successfully installed SecretStorage-3.1.2 artifacts-keyring-0.2.9 certifi-2020.4.5.2 cffi-1.14.0 chardet-3.0.4 cryptography-2.9.2 distro-1.5.0 dotnetcore2-2.1.14 idna-2.9 jeepney-0.4.3 keyring-21.2.1 pycparser-2.20 requests-2.23.0 six-1.15.0 urllib3-1.25.9

Then i try to download the package

(virtual) ➜  ~ pip install xxxx --index-url=https://msasg.pkgs.visualstudio.com/xxxxx
Looking in indexes: https://msasg.pkgs.visualstudio.com/xxxxxx
No usable version of the libssl was found
WARNING: Keyring is skipped due to an exception: Failed to get credentials: process with PID 29331 exited with code -6; additional error message:
User for msasg.pkgs.visualstudio.com:

The keyring doesn't seem to be working correctly, and it tell me No usable version of the libssl was found, but i found my libssl at here:

➜  /usr find /usr -name "libssl*"
/usr/lib/x86_64-linux-gnu/libssl.so.1.1
/usr/share/doc/libssl1.1

How could i slove this problem?

+1 Just ran into the same problem:

No usable version of the libssl was found
WARNING: Keyring is skipped due to an exception: Failed to get credentials: process with PID 27902 exited with code -6; additional error message:
User for pkgs.dev.azure.com:

It looks like the dotnetcore2 dependency is using dotnet-core 2.1.14 which only supports OpenSSL1.0, which is unavailable on Ubuntu 20.04.

As a temporary workaround, I removed dotnetcore2 with python3 -m pip uninstall dotnetcore2 (you may need sudo), then installed a system-wide dotnet (https://github.com/dotnet/core/blob/master/release-notes/5.0/preview/5.0.0-preview.5-install-instructions.md).

It looks like the dotnetcore2 dependency is using dotnet-core 2.1.14 which only supports OpenSSL1.0, which is unavailable on Ubuntu 20.04.

As a temporary workaround, I removed dotnetcore2 with python3 -m pip uninstall dotnetcore2 (you may need sudo), then installed a system-wide dotnet (dotnet/core:release-notes/5.0/preview/5.0.0-preview.5-install-instructions.md@master).

Any word on this? My latest workaround is to grab the latest .net 5.0 runtime release here, and extract it to replace site-packages/dotnetcore2/bin/.

Would be better to have it work out of the box though.

There's a PR which seems to try to address this issue - #21

It looks like the dotnetcore2 dependency is using dotnet-core 2.1.14 which only supports OpenSSL1.0, which is unavailable on Ubuntu 20.04.
As a temporary workaround, I removed dotnetcore2 with python3 -m pip uninstall dotnetcore2 (you may need sudo), then installed a system-wide dotnet (dotnet/core:release-notes/5.0/preview/5.0.0-preview.5-install-instructions.md@master).

Any word on this? My latest workaround is to grab the latest .net 5.0 runtime release here, and extract it to replace site-packages/dotnetcore2/bin/.

Would be better to have it work out of the box though.

It works! But the lastest keyring still has same problem.

In order to consolidate to fewer feedback channels, we've moved suggestions and issue reporting to Developer Community.