简体   繁体   English

如何不在.pypirc中存储密码?

[英]How to not store password in .pypirc?

I'm trying to set up a private Pypi cloud using CloudPypi. 我正在尝试使用CloudPypi设置私有Pypi云。 And I really don't want store my password in .pypirc. 而且我真的不想将密码存储在.pypirc中。 I want to be prompt to type in my password every time I upload a package. 我想在每次上传软件包时提示输入密码。

In Python document about .pypirc , it says: 有关.pypirc的Python文档中 ,它说:

password, that will be used to authenticate. 密码,将用于进行身份验证。 If omitted the user will be prompt to type it when needed. 如果省略,则将在需要时提示用户键入。

But how do you "omit" the password here? 但是,您如何在此处“忽略”密码? I tried leaving the password line blank, tried do "password : " or "password : password". 我尝试将密码行留空,尝试执行“ password:”或“ password:password”。 None of these works. 这些都不起作用。

You omit the entire line completely: 您完全省略了整行:

[distutils]
index-servers =
    pypi

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

This has been tested on Python 3.6.2 and pip 9.0.1 这已经在Python 3.6.2和pip 9.0.1上进行了测试

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM