问题
I'm setting up Git and I am following http://lifehacker.com/5983680/how-the-heck-do-i-use-github along with the regular tutorial Git provides.
My problem is I don't want to have to type in my password each time so I am following this tutorial and when I arrive at the step where you input the git config —global credential.helper osxkeychain command, I get the error
error: key does not contain a section: —global.
If I ls it, it shows the git-credential-osxkeychain in my current directory but I'm not sure what this error means and how to fix it... Any help is much appreciated.
回答1:
You probably typed '—' (the long dash) instead of the expected double hyphen
git config --global credential.helper osxkeychain
Note the '--' in front of global, instead of '—'
The lifehacker blog posts incrrectly replace the '--' by '—'.
来源:https://stackoverflow.com/questions/22278756/setting-up-git-osxkeychain-error