how to safely (basic) auth to private PyPI with zc.buildout

怎甘沉沦 提交于 2019-12-23 02:33:17

问题


I've been so far using lovely.buildouthttp for a long time, to authenticate buildout to my private PyPI server.

The key required functionality is its ability to use credentials from a separate file. I do not want to enter credentials in the buildout config file itself.

Does zc.buildout nowadays have the ability to use basic auth credentials from another file as well? I could not find this information.

I know there's also isotoma.basicauth.buildout (have not tried it out).


回答1:


buildout can use data from .pypirc

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

With that, e.g. the following kind of entry in buildout will authenticate correctly, without having to include the credentials in the url:

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


来源:https://stackoverflow.com/questions/37323392/how-to-safely-basic-auth-to-private-pypi-with-zc-buildout

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!