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

.netrc credentials take precedence over poetry config http-basic #8443

Open
4 tasks done
NiklasRosenstein opened this issue Sep 15, 2023 · 1 comment · May be fixed by #9738
Open
4 tasks done

.netrc credentials take precedence over poetry config http-basic #8443

NiklasRosenstein opened this issue Sep 15, 2023 · 1 comment · May be fixed by #9738
Labels
area/auth Related to the authenticator and keyring area/config Related to configuration management kind/bug Something isn't working as expected status/triage This issue needs to be triaged

Comments

@NiklasRosenstein
Copy link

  • Poetry version: 1.6.1
  • Python version: 3.10.12
  • OS version and name: Ubuntu 22.04
  • pyproject.toml: Irrelevant
  • I am on the latest stable Poetry version, installed using a recommended method.
  • I have searched the issues of this repo and believe that this is not a duplicate.
  • I have consulted the FAQ and blog for any relevant entries or release notes.
  • If an exception occurs when executing a command, I executed it again in debug mode (-vvv option) and have included the output below.

Issue

Credentials configured in ~/.netrc are taking precedence over credentials configured with poetry config http-basic.repo-name. I've traced it down to the poetry.utils.Authenticator.request having the proper Authentication header for the credentials configured with poetry config, but the returned resp.request.headers contains the credentials configured in ~/.netrc.

I think this is a bug because the credentials configured explicitly with Poetry should take precedence over catch-all credentials configured in ~/.netrc. There is also no log line with -vvv indicating that credentials from ~./netrc are being used.

@NiklasRosenstein NiklasRosenstein added kind/bug Something isn't working as expected status/triage This issue needs to be triaged labels Sep 15, 2023
@jvrana
Copy link

jvrana commented Jun 11, 2024

We just hit this same exact thing on our team and it was challenging to discover this issue. I think this should be mentioned in the documentation, in the very least.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area/auth Related to the authenticator and keyring area/config Related to configuration management kind/bug Something isn't working as expected status/triage This issue needs to be triaged
Projects
None yet
3 participants