在pip requirements文件中使用环境变量

时间:2015-12-18 09:18:47

标签: heroku pip

我已将以下内容添加到我的requirements.txt文件中,以便在Heroku应用程序中使用:

git+https://username:my_real_password@bitbucket.org/user/repo.git

但是,我不想在我的仓库中使用密码,所以我想在Heroku中创建一个名为PASSWORD的环境变量,并将其设置为'my_real_password'。

然后我将需求文件中的行更改为:

git+https://username:$PASSWORD@bitbucket.org/user/repo.git

但请将我的密码解释为$ PASSWORD。

所以我的问题是,如何强制pip查找环境变量?我可以使用一些逃脱角色吗?

0 个答案:

没有答案