1. Create a fine-grained personal access token with “Contents” permission to Repositories you have selected.
  2. Configure Git to store credentials on disk: git config --global credential.helper store (Credentials are stored in plaintext!)
  3. Access the repo via https with your username and the personal access token as password.
$ git clone https://github.com/USERNAME/REPO.git
Username: YOUR-USERNAME
Password: YOUR-PERSONAL-ACCESS-TOKEN
  1. Rotate the token before it expires.

References