How can a Jenkins user authentication details be “passed” to a script which uses Jenkins API to create jobs?

前端 未结 7 655
别跟我提以往
别跟我提以往 2020-12-02 08:24

I have a script that delete and re-create jobs through curl HTTP-calls and I want to get rid of any hard-coded \"username:password\". E.g. curl -X POST $url --user use

7条回答
  •  小蘑菇
    小蘑菇 (楼主)
    2020-12-02 09:08

    I needed to explicitly add POST in the CURL command:

    curl -X POST http://:@/safeRestart
    

    I also have the SafeRestart Plugin installed, in case that makes a difference.

提交回复
热议问题