Git修改和配置本地用户名和邮箱
一、问题--
代码推送失败,显示以下内容,是因为本地的用户名或者邮箱错误,一般是关注用户名,但是有的项目是通过邮箱认证的,要注意这点
remote: GitLab: Author ' ' is not a member of team
二、在配置前,需要先查看下当前的用户名和邮箱是什么
-查看用户名
git config user.name
-查看邮箱
git config user.email
-查看所有配置信息
git config --list
三、配置信息
-配置用户名
git config user.name "newname"
-配置邮箱
git config user.email "newEmail"
-全局配置
git config --global user.name "newname"
git config --global user.email "newemail"