Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Couldn't find github in keychain MacOS

August 13th, github no longer accepts password for git actions. So, to update the token, I would have to change the password field in the keychain (github keychain) to token as recommend. But, Unfortunately I couldn't find my keychain related to github.

enter image description here

Where can I find the keychain for github, and edit it so that git actions works ?!

like image 457
Sai Krishnadas Avatar asked Aug 23 '21 07:08

Sai Krishnadas


People also ask

How do I fix Mac keychain Cannot be found?

To fix this: Run Keychain Access (found in /Applications/Utilities) click "Keychain Access" in the menu bar at the top and select "Keychain First Aid". Run the repair and then run verify.


2 Answers

Have you tried to put your token as password for git action? When git asked for the password, just put your token as password.

If you have never logged in to GitHub yet, then you will not find GitHub in the keychain. Make sure when you generate token you checked all the scopes you need.

like image 77
Yasrina yuliasari Avatar answered Oct 24 '22 04:10

Yasrina yuliasari


Assuming git config credential.helper does return osxkeychain, not finding github.com in it means: the helper is ready to cache your new credentials.
A new git push should display a prompt where you would enter your GitHub user account name, and your PAT (Personal Access Token).

Check first nothing was cached with:

printf "protocol=https\nhost=github.com"| git-credential-osxkeychain get

If it was, you could remmove it with the erase command:

printf "protocol=https\nhost=github.com"| git-credential-osxkeychain erase
like image 2
VonC Avatar answered Oct 24 '22 05:10

VonC