gpt4 book ai didi

python - Twine 每次都要求我输入密码 : how to use the . pypirc

转载 作者:行者123 更新时间:2023-12-01 00:34:09 33 4
gpt4 key购买 nike

我已安装 pip pypirc 并使用必要的密码设置 ~/.pypirc 文件。为什么每次调用 python setup.py 时,tine 都要求输入密码?

  $twine upload --repository-url https://test.pypi.org/legacy/ dist/*
Enter your username:

这是.pypirc的形式

[distutils] # this tells distutils what package indexes you can push to
index-servers =
pypi
pypitest

[pypi]
repository: https://pypi.python.org/pypi
username: myuser
password: mypwd

[pypitest]
repository: https://testpypi.python.org/pypi
username: myuser
password: mypwd

更新不包含--repository-url给出:

UploadToDeprecatedPyPIDetected: You're trying to upload to the legacy PyPI site 'https://pypi.python.org/pypi'. Uploading to those sites is deprecated.
The new sites are pypi.org and test.pypi.org. Try using https://upload.pypi.org/legacy/ (or https://test.pypi.org/legacy/) to upload your packages instead. These are the default URLs for Twine now.
More at https://packaging.python.org/guides/migrating-to-pypi-org/ .

最佳答案

twine upload dist/*

twine upload -r pypi dist/*

twine upload -r pypitest dist/*

据我了解twine --repository-url <url>甚至没有咨询~/.pypirc 。与-r <name>它查找 ~/.pypirc获取 URL、用户名和密码。如果省略-r <name> , twine 使用 ~/.pypirc 中的第一个存储库.

关于python - Twine 每次都要求我输入密码 : how to use the . pypirc,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57935191/

33 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com