Skip to content

pip prints out username and password from URLs with them #4746

Closed
@mitar

Description

@mitar
  • Pip version: 9.0.1
  • Python version: 3.5.2
  • Operating system: Mac OS X

Description:

When I am installing pip packages from URLs which include username and password, pip prints username and password back out. This is problematic because if I am trying to install packages in an environment which logs output (Docker build for example, or CI runner) password will be logged and potentially publicly stored. I could limit pip's output, but then I might miss important output, and it will be harder to debug things.

Ideally, pip would obfuscate URLs before printing them out.

What I've run:

pip install git+https://username:password@github.com/example/private.git

Output:

Collecting git+https://username:password@github.com/example/private.git
  Cloning https://username:password@github.com/example/private.git to ...

Metadata

Metadata

Assignees

No one assigned

    Labels

    auto-lockedOutdated issues that have been locked by automationstate: awaiting PRFeature discussed, PR is neededtype: enhancementImprovements to functionality

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions