Skip to content

Private github URLs #2172

@nikonikolov

Description

@nikonikolov

I am trying to use a private github url in requirements.txt.
This works fine:

databib @ git+https://{TOKEN}@github.com/nikonikolov/databib.git@0.0.17

However, when I compile the above with

pip-compile -- --generate-hashes --allow-unsafe

and then run pip-install I get ERROR: Can't verify hashes for these requirements because we don't have a way to hash version control repositories:

I am under the impression that providing a specific file path should fix the hashing problem, e.g.

databib @ git+https://{TOKEN}@github.com/nikonikolov/databib/archive/refs/tags/0.0.17.tar.gz
# OR
git+https://{TOKEN}@github.com/nikonikolov/databib/archive/refs/tags/0.0.17.tar.gz

Even though the link is accessible in the browser, when I run pip-compile, I get the error

Could not install requirement databib@ https://****@github.com/nikonikolov/databib/archive/refs/tags/0.0.17.tar.gz from https://****@github.com/nikonikolov/databib/archive/refs/tags/0.0.17.tar.gz (from -r barrel/core/requirements.txt (line 44)) because of HTTP error 404 Client Error: Not Found for url: https://github.com/nikonikolov/databib/archive/refs/tags/0.0.17.tar.gz for URL https://****@github.com/nikonikolov/databib/archive/refs/tags/0.0.17.tar.gz

Also tried the suggested

databib @ git+https://{TOKEN}@github.com/nikonikolov/databib/archive/6842383696984044314fd97fa8320a197903472f.zip
# OR
https://{TOKEN}@github.com/nikonikolov/databib/archive/6842383696984044314fd97fa8320a197903472f.zip

but pip-compile fails with it too.

What's the correct way to install private github repositories and use hashing or alternatively disable hashing only for those github repos

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions