Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to use git with a remote repo over the command line in OS X 10.8.4. When I enter my credentials for GitHub every time I perform a git push -u origin master, I get a system saying "A keychain cannot be found to store [my GitHub credentials]." I'm given the option to reset my keychain or continue without storing the creds.

I tried following the instructions given on Apple's site for this situation – although they're a bit outdated.

When I try to reset my keychain, I'm prompted for my login password, which is systematically rejected by the authentication dialog.

I've never had this kind of issue; what's the cause, and how can it be fixed?

Shown in the Keychain Access app:

  • Login

  • System

  • System roots

In the ~/LIbrary/Preferences file:

login.keychain
metadata.keychain
two hidden files with seemingly random alphanumeric names

The permissions for ~/Library/Preferences are

-rw-r--r--

For my personal account, and no permissions are shown for root upon ls -l. This may be the root of the problem; I was trying to push using root.

share|improve this question
    
What keychain files do you have in your library? What are that folder's permissions? What gets shown in the Keychain Access app? –  Daniel Beck Aug 13 '13 at 19:43
    
@DanielBeck Updated my question with that info. –  at least three characters Aug 13 '13 at 19:49
    
Are you in a root shell when running git? If so, that's the issue. You probably shouldn't do that unless you have a really good reason. Maybe you'd succeed by creating /var/root/Library/Keychains (that's root's home directory) and copying an empty keychain there. –  Daniel Beck Aug 13 '13 at 19:57
    
I just tried performing git push -u origin master on the same directory from my (non-root) login shell, and got the same error. –  at least three characters Aug 13 '13 at 19:58
    
It might also depend on how you entered the root shell. sudo -s keeps your regular user's $HOME, while su/sudo su does not. –  Daniel Beck Aug 13 '13 at 19:58

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.