为什么jx install运行chrome来获取管理员令牌?

时间:2018-08-29 12:30:31

标签: jenkins--x

运行jx install时收到这些错误消息

Attempting to find the Jenkins API Token with the browser in headless mode...using url http://jenkins.jx.35.205.149.20.nip.io/me/configure
unable to automatically find API token with chromedp using URL http://jenkins.jx.35.205.149.20.nip.io/me/configure
retrying after error:Running in batch mode and no default api token found

不幸的是,我正在从Ansible docker容器中运行那些安装脚本。结果,我没有在容器中安装chrome(也没有X环境和窗口管理器)。

那么为什么要检索此令牌?并有办法“手动”设置它(例如,通过另一个jx命令)吗?

1 个答案:

答案 0 :(得分:0)

Jenkins目前没有其他方法来获取API令牌,直到我们转向临时/单发大师而不是静态大师。

我们可以禁用Chrome吗?如果无法使用Chrome来获取API令牌,则代码会要求您访问URL并从Jenkins控制台复制/粘贴api令牌