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

PDM cannot find keyring credentials when not using -v #523

Closed
canatella opened this issue Jul 1, 2021 · 4 comments
Closed

PDM cannot find keyring credentials when not using -v #523

canatella opened this issue Jul 1, 2021 · 4 comments
Labels
🐛 bug Something isn't working

Comments

@canatella
Copy link

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

Steps to reproduce

I use the python keyring to authenticate to a private pip repo and I try updating a public package.

keyring set https://mycompany.jfrog.io/mycompany/api/pypi/mycompany-pip3-stable/simple/ myuser mypassword
keyring set https://mycompany.jfrog.io/mycompany/api/pypi/mycompany-pip3-testing/simple/ myuser mypassword
pdm update conan
[PdmException]: The credentials for https://mycompany.jfrog.io/mycompany/api/pypi/mycompany-pip3-stable/simple/autopep8/ are not provided or correct. Please run the command with `-v` option.

If I run the command again with -v as suggested, it works correctly.

Actual behavior

Pdm fails with invalid credentials

Expected behavior

Pdm does not fail when not using -v

Environment Information

# Paste the output of `pdm info && pdm info --env` below:
PDM version:        1.6.4                                                   
Python Interpreter: /home/dam/bl/repos/.direnv/python-3.9.5/bin/python (3.9)
Project Root:       /home/dam/bl/repos/bbw                                  
Project Packages:   /home/dam/bl/repos/bbw/__pypackages__/3.9               
{
  "implementation_name": "cpython",
  "implementation_version": "3.9.5",
  "os_name": "posix",
  "platform_machine": "x86_64",
  "platform_release": "5.11.0-22-generic",
  "platform_system": "Linux",
  "platform_version": "#23-Ubuntu SMP Thu Jun 17 00:34:23 UTC 2021",
  "python_full_version": "3.9.5",
  "platform_python_implementation": "CPython",
  "python_version": "3.9",
  "sys_platform": "linux"
}

These are the source added in the pyproject.toml

[tool]
[tool.pdm]
[[tool.pdm.source]]
name = "pypi"
url = "https://mycompany.jfrog.io/mycompany/api/pypi/mycompany-pip3-stable/simple"
verify_ssl = true

[[tool.pdm.source]]
name = "5780b0"
url = "https://mycompany.jfrog.io/mycompany/api/pypi/mycompany-pip3-testing/simple"
verify_ssl = true

[[tool.pdm.source]]
name = "057f20"
url = "https://pypi.python.org/simple/"
verify_ssl = true
@canatella canatella added the 🐛 bug Something isn't working label Jul 1, 2021
@frostming
Copy link
Collaborator

Did you install pdm in the same environment as keyring? That is, are the sys.prefix the same for the two applications?

@canatella
Copy link
Author

No they aren't. pdm is in its own pipx managed environment, keyring is in the global python environment.

@frostming
Copy link
Collaborator

Would you like to test on the main branch? See the installation instruction about how to install the HEAD version.

@canatella
Copy link
Author

Works ok now! Thanks a lot for promptly fixing this :)

dam@workstation:~/repos/bbw$ pipx install --force ./pdm
Installing to existing venv 'pdm'
  installed package pdm 1.6.5.dev13+g3034516, Python 3.9.5
  These apps are now globally available
    - pdm
done! ✨ 🌟 ✨
dam@workstation:~/repos/bbw$ pdm update conan
Updating packages: conan.
✔ 🔒 Lock successful
Changes are written to pdm.lock.
All packages are synced to date, nothing to do.


🎉 All complete!

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