关于PyPI私服的配置和使用
-
私服配置
(可选)创建一个
Blob Stores,供仓库使用
选择pypi类型的local,proxy,group各配置一个,(group可配置多个)
local中修改部署策略为:Allow redeploy
proxy中设置镜像源,推荐https://pypi.tuna.tsinghua.edu.cn/simple
group中将local和proxy仓库添加为成员上传私有包
首先修改配置:
vim ~/.pypirc[distutils] index-servers=local [local] repository: https://repository.genostack.com/repository/pypi-local/ username: 个人私服账号 password: 个人私服密码打包上传:
python setup.py sdist upload -r local下载
vim ~/.config/pip/pip.conf[global] index-url=https://pypi.tuna.tsinghua.edu.cn/simple extra-index-url=https://repository.genostack.com/repository/pypi-group/simple可以通过命令直接配置
pip config set global.index-url https://pypi.tuna.tsinghua.edu.cn/simple pip config set global.extra-index-url https://repository.genostack.com/repository/pypi-group/simple