How to Install a Private Package from GitHub Or BitBucket
In this tutorial you can find how to install a private package with pip from GitHub Or BitBucket.
Install a Private Package from GitHub
To install private package on GitHub you need to use the next syntax: pip install git+repo
:
Example for
pip install git+ssh://git@bitbucket.org/username/projectname.git
or with example public project
pip install git+https://github.com/softhints/python.git
For private repositories this will trigger a token prompt or some other authentication method.
The authenticity of host 'github.com (ip)' can't be established.
You may face also warning message like:
The authenticity of host 'github.com (ip)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no)?
You will need to verify the fingerprint - GitHub's SSH key fingerprints and if the match you can answer - Yes.
You can find listed all the public tests from GitHub:
SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 (RSA)
and the corresponding dates.
Install a Private Package from BitBucket
To install private package from BitBucket you can use the next syntax:
pip install git+ssh:repo
or
pip install git+ssh://git@bitbucket.org/username/projectname.git
Pip
will try to use your SSH keys in this case. If they are missing you will be prompted to enter them or you will get an error.