Set the current directory to your Project root
> cd <project-folder>
Run the command to set remote access via token
> git remote set-url origin https://<username>:<personal-access-token>@github.com/<username>/<repository-name>.git
Example:
> git remote set-url origin https://sampleuser:a7b19929***58fe65d1c@github.com/sampleuser/sampleproject.git