- Create a fine-grained personal access token with “Contents” permission to Repositories you have selected.
- Configure Git to store credentials on disk:
git config --global credential.helper store
(Credentials are stored in plaintext!) - Access the repo via https with your username and the personal access token as password.
- Rotate the token before it expires.