Using personal access tokens with github

Submitted by barnettech on Thu, 09/08/2022 - 10:35

The format is the following:

git remote set-url origin https://USERID:PERSONAL_ACCESS_TOKEN@github.cms.gov/CMCS/MedicaidDrupal.git

Personal access token you generate from github under settings->developer settings->Personal access tokens

your .git/config should have a section that looks like this:

[remote "origin"]
url = https://USERID:PERSONAL_ACCESS_TOKEN@github.cms.gov/CMCS/MedicaidDrupal…
fetch = +refs/heads/*:refs/remotes/origin/*
pushurl = https://USERID:PERSONAL_ACCESS_TOKEN@github.cms.gov/CMCS/MedicaidDrupal…