import jenkins
jen = jenkins.Jenkins(url="https://us1****xhpu******************.com:9080/" ,username="sk******", password="00326aef7*******************15695")
print jen.get_whoami()
Note: 密码是API令牌
错误:
requests.exceptions.SSLError:HTTPSConnectionPool(host ='**********************',port = 9080):使用url超出最大重试次数:/ crumbIssuer / api / json(由SSLError引起(SSLError(1,你'[SSL:CERTIFICATE_VERIFY_FAILED]证书验证失败(_ssl.c:590)'),))
我试过https→http但没有工作 .
1 回答
以下代码有效