代码之家  ›  专栏  ›  技术社区  ›  Riduidel

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

  •  0
  • Riduidel  · 技术社区  · 6 年前

    当我跑的时候 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 回复  |  直到 6 年前
        1
  •  0
  •   James Strachan    6 年前

    目前,Jenkins没有其他方法获得API令牌,除非我们转向短暂/一次性主控而不是静态主控。

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

    推荐文章