为Github CI配置Jenkins w / 2FA

问题描述 投票:7回答:1

我的Github帐户启用了两个因子授权(2fa)。我想将Jenkins与我的一些私有存储库集成,但我无法授权它们因为我启用了2fa。请注意,这是一个多分支管道项目。

任何想法如何配置Jenkins连接私有repos而不创建没有启用2fa的虚拟帐户? enter image description here

github jenkins two-factor-authentication
1个回答
17
投票

谁会想到点击帮助按钮?

Credentials used to scan branches and pull requests, check out sources and mark commit statuses.

If none is given, only the public repositories will be scanned, and commit status will not be set on GitHub.

If your organization contains private repositories, then you need to specify a credential from an user who have access to those repositories.
This is done by creating a "username with password" credential where the password is GitHub personal access tokens. The necessary scope is "repo"

即使用Jenkins凭证的用户名/密码时使用Github personal access token作为密码。

© www.soinside.com 2019 - 2024. All rights reserved.