Follow these simple steps to set up GitHub authentication with a personal access token:
-
Open a command line window on your PC or Terminal on Mac
-
Set the current directory to your project root
cd C:\Users\Giddy\source\repo\MySampleProject -
Run the command to set remote access via a token
git remote set-url origin https://username:token@github.com/username/repository.gitExample:
git remote set-url origin https://sampleuser:a7b19929***58fe65d1c@github.com/sampleuser/sampleproject.git