Skip to content

hello-jkoubi/Remove-Git-Credentials

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Removing Git Credentials from Stretch Before Customer Deployment

Use this guide before handing a robot to a customer to remove all GitHub authentication and personal Git credentials.


1. Log Out of GitHub CLI

Check status:

gh auth status

If logged in, log out:

gh auth logout

Verify:

gh auth status

You should see that you are not logged in.

2. Remove Stored HTTPS Credentials

Check if a credential helper is configured:

git config --global credential.helper

If it returns:

store

Then credentials are saved in ~/.git-credentials. Remove them:

rm ~/.git-credentials

Remove the credential helper:

git config --global --unset credential.helper

Verify:

git config --global credential.helper

It should return nothing.

3. Remove SSH Keys (If Present)

Check SSH directory:

ls ~/.ssh

If you see private keys such as:

id_rsa
id_ed25519

Remove them:

rm ~/.ssh/id_rsa*
rm ~/.ssh/id_ed25519*

Do NOT remove:

known_hosts

4. Remove Global Git Identity (If Present)

Check configured name and email:

git config --global user.name
git config --global user.email

If they show your credentials, remove them:

git config --global --unset user.name
git config --global --unset user.email

5. Final Verification Checklist

Run:

gh auth status
git config --global credential.helper
ls ~/.ssh
git config --global user.name
git config --global user.email

Confirm:

  • Not logged into GitHub CLI

  • No credential helper configured

  • No private SSH keys present

  • No Git user.name or user.email

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors