How to create personal access token in GitHub
How to generate a personal access token (classic) in GitHub
Click on Open user account menu

Click on Settings

Click on Developer settings

Click on Personal access tokens

Click on Tokens (classic)

Click on Generate new token

Click on Generate new token (classic)…

Type the name of the token. F.e. "Confluence DC GitHub links"

Set the expiration
30 days or what works for you.
Check repo…

Click on Generate token

The token is ready, copy it and insert in the GitHub links for Confluence Data Center configuration page.
Updated: