Super User is a question and answer site for computer enthusiasts and power users. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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:

two hidden files with seemingly random alphanumeric names

The permissions for ~/Library/Preferences are


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. – Jules 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. – Jules 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

You must log in to answer this question.

Browse other questions tagged .