git remote set-url origin https://<your-username>:<token>@github.com/<username>/<repo-name>.git
# if you face the following error, or adding for the first time
# fatal: No such remote 'origin'
# use this
git remote add origin https://<your-username>:<token>@github.com/<username>/<repo-name>.git