git config --global credential.helper osxkeychain 然后再次输入用户名和密码 转自:https://www.jianshu.com/p/66985f7f4114