Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Credentials in keyring not used during build #534

Closed
1 task done
basvanberckel opened this issue Jul 9, 2021 · 2 comments
Closed
1 task done

Credentials in keyring not used during build #534

basvanberckel opened this issue Jul 9, 2021 · 2 comments
Labels
🐛 bug Something isn't working

Comments

@basvanberckel
Copy link

  • I have searched the issue tracker and believe that this is not a duplicate.

Make sure you run commands with -v flag before pasting the output.

Steps to reproduce

Add an index that uses credentials from keyring. run pdm build.
A more direct way is to run the pip command that is run during build, e.g.: /usr/bin/python -Esm pip install --ignore-installed --prefix /tmp/pdm-build-env-xxxxxxxx -r /tmp/pdm-build-reqs-xxxxxxxx.txt

Actual behavior

$ pdm build -v
Building sdist...
Preparing isolated env for PEP 517 build...
Looking in indexes: https://****@gitlab.com/api/v4/groups/[redacted]/-/packages/pypi/simple, https://pypi.org/simple

This hangs, pip is asking for the credentials underneath:

/usr/bin/python -Esm pip install --ignore-installed --prefix /tmp/pdm-build-env-xxxxxxxx -r /tmp/pdm-build-reqs-xxxxxxxx.txt
Looking in indexes: https://****@gitlab.com/api/v4/groups/[redacted]/-/packages/pypi/simple, https://pypi.org/simple
User for gitlab.com:

Running this command with the -s flag works correctly:

/usr/bin/python -Em pip install --ignore-installed --prefix /tmp/pdm-build-env-xxxxxxxx -r /tmp/pdm-build-reqs-xxxxxxxx.txt
Looking in indexes: https://****@gitlab.com/api/v4/groups/[redacted]/-/packages/pypi/simple, https://pypi.org/simple
Collecting pdm-pep517
  Using cached pdm_pep517-0.8.0-py3-none-any.whl (180 kB)
Installing collected packages: pdm-pep517
Successfully installed pdm-pep517-0.8.0

Expected behavior

A successful build where pip can access the keyring module

Environment Information

I'm on the current HEAD to get the fix for #523. Behavior is identical when on 1.6.4 (and using the -v flag when calling pdm)

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.6.5.dev26+g1d68237                                   
Python Interpreter: /usr/bin/python (3.8)                                  
Project Root:       [redacted]               
Project Packages:  [redacted]/__pypackages__/3.8
{
  "implementation_name": "cpython",
  "implementation_version": "3.8.10",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.11.22-100.fc32.x86_64",
  "platform_system": "Linux",
  "platform_version": "#1 SMP Wed May 19 18:58:25 UTC 2021",
  "python_full_version": "3.8.10",
  "platform_python_implementation": "CPython",
  "python_version": "3.8",
  "sys_platform": "linux"
}
@basvanberckel basvanberckel added the 🐛 bug Something isn't working label Jul 9, 2021
@frostming
Copy link
Collaborator

Do you have keyring installed under /usr/bin/python prefix?

@basvanberckel
Copy link
Author

I did not, I do now, that did indeed fix it. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants