方法一
输入
git config --global credential.helper store
之后push一次即可
方法二(ssh-keygen)
生成秘钥
放到github上
把~/.ssh/id_rsa.pub这个公钥放到你的github账户上
登录github,$settings->SSH and GPG keys->New SSH key$


title随便填,key填id_rsa.pub里的内容。add ssh key即可