27

I created a Python 3.5 package for work, which is in a private Bitbucket repo and I can easily pull the code and do a "python .\setup.py install" to have it install, but I want to try to eliminate the step of having to pull the code and have multiple copies on my machine and at the same time make it easier for my coworkers to install/update the package. Is it possible to use git bash or cmd (we are all on Windows) to install the package and ask for credentials in the process?

2 Answers 2

47

You can use the https option listed in pip_install. https://pip.pypa.io/en/stable/reference/pip_install/#git

Sample Code:

pip install git+https://USER_NAME@GIT_URL/PATH_TO_YOUR_REPO.git

You can use the url Bitbucket gives you when you request the clone url. Just remember to add the git+ to it.

Sign up to request clarification or add additional context in comments.

2 Comments

Why does there need to be a user?
4

Bitbucket is now moving to App Passwords and is deprecating the use of passwords in the clone command.

To install from a private repo with pip use

pip install git+https://USER_NAME:APP_PASSWORD@GIT_URL/PATH_TO_YOUR_REPO.git

You can create an app_password from following these instructions https://support.atlassian.com/bitbucket-cloud/docs/app-passwords/

2 Comments

whats an example of what the GIT_URL should look like?
is USER_NAME the name of the account or the name of the app password?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.