Skip to content

Instantly share code, notes, and snippets.

@richchurcher
Last active January 12, 2023 19:00
Embed
What would you like to do?
#!/bin/bash
# Logout current GitHub credentials and remove global user.name, user.email
echo -e "host=github.com\nprotocol=https\n" | git credential-osxkeychain erase
git config --unset-all --global user.name
git config --unset-all --global user.email
@DavidSights
Copy link

Thank you

@smijar2
Copy link

smijar2 commented Jun 22, 2018

Thanks.

@Yorzic
Copy link

Yorzic commented Jul 13, 2018

Thank you, @richchurcher!

@ramaken
Copy link

ramaken commented Aug 15, 2018

What about logging in and prompting the git credential manager ?

@Val-istar-Guo
Copy link

thanks

@JackLeverentz
Copy link

Thanks

@diegotf30
Copy link

Thank

@apinya2020
Copy link

thank you

@mauriciocoruja
Copy link

Thanks!!!

@adedayojs
Copy link

Thanks Bro

@naetastore
Copy link

thanks ..

@lai-alien-z
Copy link

Thanks a ton!

@coder-shin
Copy link

Thanks!! It's really helpful! @richchurcher

@pSnehanshu
Copy link

git: 'credential-osxkeychain' is not a git command. See 'git --help'.

@NichuNaizam
Copy link

@dorigom06
Copy link

I love you so much.

@aditrades
Copy link

THanks!

@whitis01
Copy link

Thank you!

@rwaddin
Copy link

rwaddin commented Apr 6, 2021

git: 'credential-osxkeychain' is not a git command. See 'git --help'.

same

@honne23
Copy link

honne23 commented Aug 15, 2021

thank you

@Trishulks23
Copy link

@pSnehanshu @rwaddin
If you are on linux, change line 4 to
echo -e "host=github.com\nprotocol=https\n" | git credential-manager-core erase

@kamal614
Copy link

Thank you, that was really helpful

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment