How to get the API Token for Jenkins

前端 未结 3 1429
青春惊慌失措
青春惊慌失措 2020-12-02 12:43

I am trying to use the jenkins rest api. In the instructions it says I need to have the api key. I have looked all over the configuration pages to find it. How do i get the

3条回答
  •  难免孤独
    2020-12-02 13:17

    Since Jenkins 2.129 the API token configuration has changed:

    You can now have multiple tokens and name them. They can be revoked individually.

    1. Log in to Jenkins.
    2. Click you name (upper-right corner).
    3. Click Configure (left-side menu).
    4. Use "Add new Token" button to generate a new one then name it.
    5. You must copy the token when you generate it as you cannot view the token afterwards.
    6. Revoke old tokens when no longer needed.

    Before Jenkins 2.129: Show the API token as follows:

    1. Log in to Jenkins.
    2. Click your name (upper-right corner).
    3. Click Configure (left-side menu).
    4. Click Show API Token.

    The API token is revealed.

    You can change the token by clicking the Change API Token button.

提交回复
热议问题