jenkinsjenkins-pluginsjenkins-github-plugin

Add jeninks local user readonly account when using Global GitHub OAuth Sec


How can I add a limited access account for jenkins automation when I'm using Global GitHub OAuth Settings?

I'm using GitHub OAth for login to jenkins and I have python jenkinsapi scripts that I want to run as a user with read only access. At present, all my users are github users.

I can create a github account without access to my repositories and then limit that accounts access to jenkins but this seems cumbersome.

Is there a way to use multiple security realms or to create local users?

It seems that when jenkins contains a local user, that the plugin uses this first (plugin-source)


Solution

  • If you look at Manage Jenkins->Configure Global Security, you can see that you can select only one security realm.

    I would say, for Jenkins use create a github service account specifically that user can be restricted to just a few repositories. You can also look at matrix based security or project based matrix security if you want to restrict authorization further