相关疑难解决方法(0)

私有PyPI的pip.conf中的凭据

我有一个私有的PyPI存储库.有没有办法存储pip.conf类似的凭证.pypirc

我的意思是说.目前.pypirc你可以有这样的配置:

[distutils]
index-servers = custom

[custom]
repository: https://pypi.example.com
username: johndoe
password: changeme
Run Code Online (Sandbox Code Playgroud)

从我发现你可以放入pip.conf:

[global]
index = https://username:password@pypi.example.com/pypi
index-url = https://username:password@pypi.example.com/simple
cert = /etc/ssl/certs/ca-certificates.crt
Run Code Online (Sandbox Code Playgroud)

但在这里我看到两个问题:

  1. 对于每个URL,您每次都需要指定相同的用户名和密码.
  2. 用户名和密码在日志中可见,因为它们是URL的一部分.

有没有办法在网址之外存储用户名和密码?

python config pip pypi

18
推荐指数
3
解决办法
5649
查看次数

标签 统计

config ×1

pip ×1

pypi ×1

python ×1