Use this guide before handing a robot to a customer to remove all GitHub authentication and personal Git credentials.
Check status:
gh auth statusIf logged in, log out:
gh auth logoutVerify:
gh auth statusYou should see that you are not logged in.
Check if a credential helper is configured:
git config --global credential.helperIf it returns:
storeThen credentials are saved in ~/.git-credentials. Remove them:
rm ~/.git-credentialsRemove the credential helper:
git config --global --unset credential.helperVerify:
git config --global credential.helperIt should return nothing.
Check SSH directory:
ls ~/.sshIf you see private keys such as:
id_rsa
id_ed25519Remove them:
rm ~/.ssh/id_rsa*
rm ~/.ssh/id_ed25519*Do NOT remove:
known_hostsCheck configured name and email:
git config --global user.name
git config --global user.emailIf they show your credentials, remove them:
git config --global --unset user.name
git config --global --unset user.emailRun:
gh auth status
git config --global credential.helper
ls ~/.ssh
git config --global user.name
git config --global user.emailConfirm:
-
Not logged into GitHub CLI
-
No credential helper configured
-
No private SSH keys present
-
No Git
user.nameoruser.email