【发布时间】:2019-02-21 07:11:01
【问题描述】:
我可以通过 github 插件使用 jenkins 私钥(其公钥位于 github 存储库中)checkout scm。我可以安装在我的本地系统(osx)上。但我无法从 Jenkins 的私有 github 存储库中安装 python 包。
对此有什么想法吗?我猜我需要将令牌放入github_repo_token=os.environ.get('GITHUB_TOKEN', 'NA')之类的环境变量中,然后将其插入"git+https://{}@github.com/owner/repo.git@master".format(github_repo_token)之类的github url中,然后它将起作用。
如何将令牌放入环境变量或传递给 setup.py 脚本?
【问题讨论】: