Jenkins: 403 No valid crumb was included in the request

前端 未结 16 1863
野性不改
野性不改 2020-12-05 01:44

I configured jenkins in spinnaker as follows and setup spinnaker pipeline.

 jenkins:
    # If you are integrating Jenkins, set its location here using the bas         


        
16条回答
  •  清歌不尽
    2020-12-05 02:17

    I did get the same "403 No valid crumb was included in request" error when I create a jenkins job from a java program using jenkins-client library i.e. com.offbytwo.jenkins. Then I used jenkins api token instead of password in following code. Now, the issue is fixed.

    JenkinsServer jServer = new JenkinsServer(new URI(jenkins_url), jnkn_username, jnkn_password);
    

    We can generate API Token from Jenkins console. Profile > Configure > API Token (Add new token)

提交回复
热议问题