Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

osxkeychain is not storing github credentials?

Background: I have 2FA set up in my Github account. I cloned a repo using https. I am trying to use git credential helper to store the github creds (username and Personal Access Token) so that I don't have to enter them on every git push/pull.

I followed the steps here https://help.github.com/articles/caching-your-github-password-in-git/ to store the github credentials in the Keychain Access app. However, when I do a git clone, I was asked my creds. After that when I searched the Keychain Access app for "github.com", there was no entry. So when I tried to do a git push in that repo, I was asked my github credentials again.

Why aren't my credentials being stored in the keychain app even after following the credential helper?

My OS is MacOS High Sierra 10.13.4.

like image 660
Harshil Shah Avatar asked Dec 10 '22 05:12

Harshil Shah


1 Answers

I experienced this issue this week. Where I keep on inputting username & password every time I do git pull.

After checking to the net, there were couple of options. See here

I did not look into the details deeply. Unknowingly, I went to my Keychain Access and did these steps:

  1. If you click on the lock icon Keychain Access Interface

  2. I clicked on it, making it locked Locked keychain access

  3. I tried running git pull again and prompted with git-credential-osxkeychain asking for login password. git-credential-osxkeychain prompt

  4. And lastly, I successfully pulled updates

MB-0018:laravel joseph$ git pull
Already up to date.
MB-0018:laravel joseph$

That's all. Hope this applies to you.

like image 55
jdme Avatar answered Dec 17 '22 20:12

jdme