1、编辑全局git配置文件 2、添加 [credential] helper = store 这样以后输入一次密码后以后提交就能记住密码了 转载于:https://my.oschina.net/lengxugz/blog/737110