Skip to content

Jenkins 凭证(Jenkins credentials)#

你可以使用以下凭据验证以下节点:

🌐 You can use these credentials to authenticate the following nodes:

先决条件(Prerequisites)#

Jenkins 实例上创建账户。

🌐 Create an account on a Jenkins instance.

支持的身份验证方法(Supported authentication methods)#

  • API 令牌

Jenkins 不提供公开的 API 文档;每个页面的 API 文档可以在用户界面右下角找到。有关服务的更多信息,请参考这些详细页面。有关 API 和 API 封装器的信息,请参阅 Jenkins 远程访问 API

🌐 Jenkins doesn't provide public API documentation; API documentation for each page is available from the user interface in the bottom right. Refer to those detailed pages for more information about the service. Refer to Jenkins Remote Access API for information on the API and API wrappers.

使用 API 令牌(Using API token)#

要配置此凭据,你需要:

🌐 To configure this credential, you'll need:

  • Jenkins 用户名:该令牌所属的用户
  • 一个 个人 API 令牌:从用户的 个人资料 > 配置 > 添加新令牌 中生成。更多详情请参考 Stack Overflow 的这些说明
  • Jenkins 实例 URL

Jenkins 在 2018 年重新构建了他们的 API 令牌设置。如果你正在使用较旧的 Jenkins 实例,请确保你使用的是非旧版 API 令牌。有关更多信息,请参阅 安全加固:Jenkins 2.129+ 中的新 API 令牌系统

🌐 Jenkins rebuilt their API token setup in 2018. If you're working with an older Jenkins instance, be sure you're using a non-legacy API token. Refer to Security Hardening: New API token system in Jenkins 2.129+ for more information.