We can now add the token to Jenkins as follows:
- Open Jenkins, in my case http://54.175.97.69:8080.
- Click on credentials in the left-hand side menu, then click on System just below, and then click on Global credentials.
- On the next screen click on Add credentials.
- The credentials we are going to create are of the type Username with password.
- The scope should be Global.
- Use your GitHub username (or your GitHub organization) as a username.
- Use the token generated in the last section as your password.
- The Id can be something like GitHub.
- Optionally, give a Description and click OK.
The last step of our initialization process consists of creating the Jenkins job.