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

前端 未结 7 656
别跟我提以往
别跟我提以往 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:07

    Try this way: (for example delete the job)

    curl --silent --show-error http://:@/job//doDelete
    

    The api-token can be obtained from http:///user//configure.

提交回复
热议问题