python - 获取 jenkins 作业 xml 配置
问题描述
如何在不使用用户名和密码的情况下获取 jenkins 作业 xml 配置?
server=jenkins.Jenkins(jenkins_url,*username="",password=""*)
job_name = 'Test Job'
job_xml = server.get_job_config(job_name)
使用用户名和密码详细信息,正在获取 xml,但是当不使用凭据时,作业会引发错误。
Authentication required
<!-- You are authenticated as: anonymous
Groups that you are in:
Permission you need to have (but didn't):
hudson.model.Hudson.Read
... which is implied by: hudson.security.Permission.GenericRead
... which is implied by: hudson.model.Hudson.Administer
-->
</body> </html>
解决方案
推荐阅读
- python - 如何使用自动生成的数据框名称在 for 循环中创建数据框
- python - 从包含“exp”而不是值数组的表达式中只返回一个值
- ios - 如何在 swift 的 for 循环中显示多个警报控制器
- c - 从标准输入读取整数到数组
- c - 将字符串与数组进行比较,但它给了我一个错误
- data-science - 当所有数据都是数字时,如何计算 CART 算法的基尼指数?
- javascript - jquery弹出窗口成功但传递参数失败
- c++ - 在 cpp 项目中包含的标头中声明 cuda 变量
- javascript - Firebase 模拟器错误:通道凭据必须是 ChannelCredentials 对象
- node.js - Mocha/Chai 测试失败,因为 oracledb 节点模块耗时太长