Skip to content

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

@NiklasRosenstein

Description

@NiklasRosenstein
  • 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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    area/authRelated to the authenticator and keyringarea/configRelated to configuration managementkind/bugSomething isn't working as expectedstatus/triageThis issue needs to be triaged

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions