问题
I've updated to OS X Yosemite. When running any git command that has to do with the remote repo (pull, fetch, etc) the terminal keeps asking for my github username and password (the remote is on github). If I perform these actions from the github client for mac, it doesn't ask for credentials.
My git config file is fine. My SSH key is fine too. I tried to reinstall the git command line tools from the Github app with no success.
Any suggestions?
回答1:
Run following on command line.
git config --global credential.helper osxkeychain
Then run your git command. Here is the link that helped me figure out. https://help.github.com/articles/caching-your-github-password-in-git/
回答2:
I had the problem that Git was not working because XCode has overwritten the git command. So you have to open XCode the first time and he install all other components. After that it was working.
来源:https://stackoverflow.com/questions/26425254/git-on-yosemite-keeps-asking-for-remote-username-and-password