直接从网页上获取

地址:http://IP:PORT/jenkins/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,“:”,//crumb)

curl命令获取Jenkins CSRF token_xml

curl命令获取

curl -s 'http://IP:PORT/jenkins/crumbIssuer/api/xml?xpath=concat(//crumbRequestField,":",//crumb)'

注意:token是动态变化的,每次请求获取的值都不一样