【问题标题】:how to safely (basic) auth to private PyPI with zc.buildout如何使用 zc.buildout 对私有 PyPI 进行安全(基本)身份验证
【发布时间】:2016-05-19 12:34:55
【问题描述】:

到目前为止,我一直在使用 lovely.buildouthttp 来验证我的私有 PyPI 服务器的构建。

所需的关键功能是它能够使用来自单独文件的凭据。我不想在构建配置文件本身中输入凭据。

现在 zc.buildout 是否也能够使用来自另一个文件的基本身份验证凭据?我找不到此信息。

我知道还有 isotoma.basicauth.buildout(没试过)。

【问题讨论】:

    标签: python buildout


    【解决方案1】:

    buildout 可以使用来自.pypirc的数据

    [repo_name]
    repository:https://your.egg.repo
    username:the_userid
    password:the_password
    realm:your_basicauth_realm
    

    这样,例如buildout 中的以下类型的条目将正确验证,而无需在 url 中包含凭据:

    [buildout]
    find-links =
       http://your.egg.repo/packages
    

    【讨论】:

    • 是否还要在所需的 buildout.cfg 条目上添加注释?
    • 这个“必需的 buildout.cfg 条目”是什么?
    • @sunew 查看答案的补充
    • 这还是一回事吗?我不能让它工作:zc.buildout == 2.9.5 :(
    • Soved,谢谢:community.plone.org/t/… 并为噪音感到抱歉。
    猜你喜欢
    • 2015-08-08
    • 1970-01-01
    • 2015-08-12
    • 2017-06-13
    • 2013-05-30
    • 1970-01-01
    • 2017-09-18
    • 1970-01-01
    • 2016-07-01
    相关资源
    最近更新 更多