Authenticate with GitHub via Jenkins pipeline

Hello there,

My team is trying to find the best way to authenticate with GitHub repository in a machine-to-machine scenario.

Our specific use case is pushing a branch to a GitHub repo from a Jenkins pipeline, once some checks have run on the said pipeline.

Ideally, we’d rather not use credentials that are attached to a specific user account, but all we could find in the docs seem to suggest a user account is necessary.

Is there a way to achieve it without a dedicated user? Would be great if someone could point us in the right direction.

Hi @ppl-marta-dabrowka :wave:

Welcome to the community!

Ideally, we’d rather not use credentials that are attached to a specific user account, but all we could find in the docs seem to suggest a user account is necessary.

You can use a deploy key so that you don’t have to use user-specific credentials.

Is there a way to achieve it without a dedicated user? Would be great if someone could point us in the right direction.

I’m afraid not. You will still need to make a machine user

1 Like

Thank you @ernest-phillips, a machine user is what we ended up doing.

1 Like