Go to github.com/settings/tokens and click on Generate new token. Select the repo, admin:repo_hook, and admin:org_hook scopes:
Now, a new token is generated:
Next, we can add this token to the Credentials store in Jenkins, which is like a password manager and stores our credentials for us to reference inside our configuration. Click on the Credentials entry from the sidebar on the left of the Jenkins UI.
Next, under Stores scoped to Jenkins, click on the arrow next to the (global) link and then Add credentials ...