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 令牌
¥API token
相关资源#
¥Related resources
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 用户名对于令牌所属的用户。
¥The Jenkins Username: For the user whom the token belongs to
- 个人 API 令牌:从用户个人资料详情 >“配置”>“添加新令牌”生成。请参阅 Stack Overflow 上的相关说明 获取更多详细信息。
¥A Personal API Token: Generate this from the user's profile details > Configure > Add new token. Refer to these Stack Overflow instructions for more detail.
- Jenkins 实例 URL
¥The Jenkins Instance 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.