Create a GitHub personal access token
Generate the token the Control Panel needs to read a private repository.
A personal access token lets the Control Panel clone a private GitHub repository on your behalf. Public repositories do not need a token — leave the field empty for them.
Create the token on GitHub
Open the developer settings
Sign in to GitHub, click your profile picture in the top right corner and choose Settings. At the bottom of the left menu open Developer settings.
Start a new token
Choose Personal access tokens → Tokens (classic), click Generate new token and select Generate new token (classic).
Describe the token
Fill in Note (for example
MonsterASP.NET) and choose an Expiration. With No expiration you never have to replace the token in the Control Panel; with any other value the deployment stops working on that date until you create a new token.Select the scope
Tick the repo scope (Full control of private repositories). It gives access to your private repositories; no other scope is needed to clone a repository.
Generate and copy
Click Generate token and copy the token immediately. GitHub shows it only once, so save it somewhere safe — you need it to connect the repository to your website.
Important
Treat the token like a password. Do not commit it to a repository and do not send it by e-mail. If it leaks, delete it on GitHub and create a new one.
Use the token in the Control Panel
Open Git deploy
In the Control Panel go to Websites, select your website and choose Git deploy.
Paste the token
Enter the GitHub repository URL and paste the token into Personal access token.
Check that it works
Click Load next to Branch. If the branches of your repository are listed, the token is valid and can read the repository.
Then continue with Deploy from a GitHub repository.
After Git deploy is enabled, the Repository card shows the stored token under Access. It is masked; click Show to reveal it.
Troubleshooting
Access token is not a valid value
The Control Panel accepts tokens made of letters, digits and underscores only. Check that you copied the whole token without spaces or line breaks around it.
The branches do not load
- Check that the repository URL is the HTTPS clone URL and ends with
.git. - Check that the token has not expired and that the repo scope is ticked.
The token expired
Generate a new token on GitHub. To replace the stored one, click Disable Git deploy in the Danger zone and connect the repository again with the new token. Your website files stay in place.