使用https路径clone代码后,如果直接提交,会出现两个问题:
1. 提交的用户是操作系统登陆用户;
2. 需要重复输入用户名和密码;
一 设置用户名和邮箱
git config user.name xxx; git config user.email 12@12.com
备注:此处设置的不是全局用户,方便使用多个git账号,不好的就是,以后别的项目也要重复设置用户名和密码;
git config --global user.name xx
二 保存密码
git config credential.helper store
git config --global credential.helper store