在SourceTree的仓库设置 高级 编辑配置文件 里面加入 [credential] helper = store 在配置文件里面加入一下代码就可以了: [credential] helper = store