永久记住密码
git config --global credential.helper store
会在用户主目录的.gitconfig文件中生成下面的配置。

如果没有--global,则在当前项目下的.git/config文件中添加。
当然,你也可以直接复制上面生成的配置到配置文件中。
临时记住密码
默认记住 15 分钟:
git config –global credential.helper cache
自定义记住 1 小时
git config credential.helper 'cache –timeout=3600'
windows下生成 github ssh key
ssh-keygen -t rsa -C "邮箱地址"

注:在你
git bash执行的目录下,找一下key名称.pub文件,如果没有,再找C 盘

id_rsa.pub里面的内容,添加到 github 个人设置里
跳转地址 SSH keys

测试
ssh -T git@gitub.com