Skip to content

Github Token not added to Piplock file for github repos, which fails installation  #6256

@nakulsingh1299

Description

@nakulsingh1299

Issue description

Version 2024.0.3
I use private Github repos as a utility in my backend service code.

Pipfile
utility = {ref = "1.0.0", git = "https://${GITHUB_TOKEN}@github.com/org/Utilities"}

where GITHUB_TOKEN is an environment variable
When I lock my Pipfile using the latest version, it does not add the GitHub token in the Piplock file and it is not able to fetch the private packages from GitHub while installing dependencies

Expected result

Previous Piplock file

"utility": {
            "git": "https://${GITHUB_TOKEN}@github.com/org/Utilities",
            "ref": "commit-id"
 }

Actual result

"utility": {
            "git": "github.com/org/Utilities",
            "ref": "commit-id"
 }

Steps to replicate

  1. Create a pip file with any private Github repo as a package
  2. Run below command
    pipenv install --dev

Output

Installing dependencies from Pipfile.lock (38058a)...
: ERROR: Invalid requirement: 'utility@ git+github.com/org/Utilities@commit-id' (from line 1 of /tmp/pipenv-dntff654-requirements/pipenv-ig2fc_8d-reqs.txt)
: Hint: It looks like a path. File 'utility@ git+github.com/org/Utilities@commit-id' does not exist.
ERROR: Couldn't install package: [1m{}[0m

Metadata

Metadata

Assignees

No one assigned

    Labels

    PR: awaiting-reviewThe PR related to this issue is awaiting review by a maintainer.Type: RegressionThis issue is a regression of a previous behavior.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions