打开终端、 直接输入 git config --global credential.helper osxkeychain 回车、
git config --global credential.helper osxkeychain
出现弹窗让输入电脑密码、 输入电脑密码、点击始终允许、 完事。