Intellipaat Back

Explore Courses Blog Tutorials Interview Questions
+5 votes
2 views
in DevOps and Agile by (29.3k points)
edited by

We'd like to use pip with github to install private packages to our production servers. This question concerns what needs to be in the github repo in order for the install to be successful.

Assuming the following command line (which authenticates just fine and tries to install):

pip install git+ssh://[email protected]/BlahCo/search/tree/prod_release_branch/ProductName

What needs to reside in the ProductName? Is it the contents of what would normally be in the tar file after running setup.py with the sdist option, or is the actual tar.gz file, or something else?

I'm asking here because I've tried several variations and can't make it work. Any help appreciated.

1 Answer

+6 votes
by (50.2k points)
edited by

For this, you need the whole package,

The package foo should be:

foo # the installable package

├── foo

│   ├── __init__.py

│   └── bar.py

└── setup.py

And use the following commands to install from github like:

$ pip install git+https://github.com/myuser/foo.git@v123

or

$ pip install git+https://github.com/myuser/foo.git@newbranch

Hope this will help you so that you can install pip from github.

To know more about the lifecycle of git please go through the following link:

 

31k questions

32.8k answers

501 comments

693 users

Browse Categories

...