gpt4 book ai didi

python jenkins.jenkins模块: how to login to jenkins with third party sso

转载 作者:太空宇宙 更新时间:2023-11-03 17:38:32 24 4
gpt4 key购买 nike

我需要自动化 jenkins,使用本地用户/密码从 python 登录 jenkins 非常容易。但是我们的jenkins服务器配置了assembla sso,我无法通过jenkins.jenkins python模块登录。任何人都可以建议如何使用第三方 sso 配置登录 jenkins 服务器。
python api 文档:https://python-jenkins.readthedocs.org/en/latest/api.html

我愿意使用任何其他模块。

import jenkins
j = jenkins.Jenkins('http://your_url_here', 'username', 'password')
j.get_jobs()

最佳答案

通过第三方 sso 成功登录后。从此页面 (http:///user//configure) 获取 API token ,并使用 api token 作为密码和用户名登录 Jenkins 服务器。

import jenkins
j = jenkins.Jenkins('http://your_url_here', 'username', 'password')

关于python jenkins.jenkins模块: how to login to jenkins with third party sso,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/30883248/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com