从私有Bitbucket存储库安装Python软件包 [英] Install Python Package From Private Bitbucket Repo

查看:125
本文介绍了从私有Bitbucket存储库安装Python软件包的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我创建了一个工作的Python 3.5程序包,该程序包位于私有的Bitbucket存储库中,我可以轻松提取代码并执行"python.\ setup.py install"以进行安装,但我想尝试消除这是必须提取代码并在我的计算机上拥有多个副本的步骤,同时使我的同事更容易安装/更新软件包.是否可以使用git bash或cmd(我们都在Windows上)安装软件包并在过程中要求提供凭据?

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?

推荐答案

您可以使用pip_install中列出的https选项. https://pip.pypa.io/en/stable/reference/pip_install/#git

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

示例代码:

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

您可以使用URL,当您请求克隆URL时,Bitbucket会提供给您.只需记住将git+添加到其中即可.

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

这篇关于从私有Bitbucket存储库安装Python软件包的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆