My Github account has two factor authorization (2fa) enabled. I want to integrate Jenkins with a few of my private repositories, but I cannot authorize them because I have 2fa enabled. Note this is a multibranch pipeline project.
Any ideas how to configure Jenkins to connect with private repos without creating a dummy account that does not have 2fa enabled?
In the upper-right corner of any page, click your profile photo, then click Settings. In the "Access" section of the sidebar, click Password and authentication. Under "Two-factor authentication", click Enable two-factor authentication. Under "Two-factor authentication", select Set up using an app and click Continue.
Secure Jenkins Login with Two-Factor Authentication (2FA/MFA). Supported methods are Google Authenticator, Security Question, OTP over email, Hardware token, etc. You can access your account through backup methods like security questions in case authenticator device is not accessible, stolen or hacked.
GitHub, the code hosting platform used by tens of millions of software developers around the world, announced today that all users who upload code to the site will need to enable one or more forms of two-factor authentication (2FA) by the end of 2023 in order to continue using the platform.
Whoever would have thought to click the help button?
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"
ie use a Github personal access token as your password when using username/password for your Jenkins credential.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With