【问题标题】:How can I specify upload server in pypi upload?如何在 pypi 上传中指定上传服务器?
【发布时间】:2019-01-18 20:44:15
【问题描述】:

假设我有一个 .pypirc 文件,

[distutils]
index-servers =
    pypi
    test2
    test3
    test4

[pypi]
repository: https://test.pypi.org/legacy/
username: username_1
password: passme_1
[test2]
repository: url_1
username: username_1
password: passme_1
[test3]
repository: url_2
username: username_1
password: passme_1
[test4]
repository: url_3
username: username_1
password: passme_1

如何在不指定 --repository-url 的情况下上传到 test4 个人资料?

【问题讨论】:

    标签: pypi python-packaging pypiserver


    【解决方案1】:

    twine upload --help:

    …
    -r REPOSITORY, --repository REPOSITORY
       The repository (package index) to upload the package
       to. Should be a section in the config file (default:
       pypi). (Can also be set via TWINE_REPOSITORY
       environment variable.)
    …
    

    所以你应该运行twine upload -r test4

    【讨论】:

      猜你喜欢
      • 2019-01-09
      • 2018-01-12
      • 1970-01-01
      • 2018-01-12
      • 1970-01-01
      • 2015-11-05
      • 2013-04-09
      • 2016-07-30
      • 2011-09-26
      相关资源
      最近更新 更多