xxxxxxxxxx
# After pushing the first time, do this
# Enable caching for 7200 seconds (2 hours)
git config --global credential.helper 'cache --timeout 7200'
xxxxxxxxxx
git remote remove origin
git remote add origin https://[TOKEN]@github.com/[REPO-OWNER]/[REPO-NAME]
git push
xxxxxxxxxx
# How to set up Github Personal Access Token (from Terminal)
# First you need to set the remote URL of your repo
git remote add origin remote_url_here
# then you update the remote URL with your token
git remote set-url origin https://put_username_here:put_token_here@github.com/put_username_here/repo-name.git