python詹金斯。詹金斯模块:如何使用第三方ss登录jenkins

2024-06-26 00:29:46 发布

您现在位置:Python中文网/ 问答频道 /正文

我需要使jenkins自动化,使用本地用户/密码从python登录到jenkins非常容易。但是我们的jenkins服务器配置了assembla sso,我无法通过詹金斯。詹金斯python模块。任何oen能建议如何使用第三方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()

Tags: 模块文档httpsorg服务器api密码readthedocs
1条回答
网友
1楼 · 发布于 2024-06-26 00:29:46

通过第三方sso成功登录后。从这个页面(http:///user//configure)获取API令牌,并使用API令牌作为用户名的密码登录到Jenkins服务器。在

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

相关问题 更多 >