2016-04-13 61 views
2

我正在尝试使用CloudPypi设置私人Pypi云。我真的不希望将密码存储在.pypirc中。每次上传软件包时,我都会提示输入密码。如何不在pypirc中存储密码?

Python document about .pypirc,它说:

password, that will be used to authenticate. If omitted the user will be prompt to type it when needed.

但你如何 “忽略” 的密码吗?我试着将密码行留空,尝试做“密码:”或“密码:密码”。这些都不起作用。

+0

同样的问题,它看起来像Python中没有检查NoneType密码,'python setup.py sdist upload'抱怨'TypeError:无法将'NoneType'对象隐式转换为str' – Cychih

+1

这是一个老问题:http://bugs.python.org/issue18454 – Cychih

回答

1

你完全忽略整条生产线:

[distutils] 
index-servers = 
    pypi 

[pypi] 
repository: <repository-url> 
username: <username> 

这一问题已经在Python的3.6.2测试和PIP 9.0.1

这里