idea报错:fatal: –author ‘user@mail.com’ is not ‘Name ’ and matches no existing author

2023-10-27

需求阐述

在本地项目上传到gitlab时,到了Commit Directory这一步,控制台报错:fatal: –author ‘user@mail.com’ is not ‘Name ’ and matches no existing author

解决方案

我在网上搜了搜,尝试了一下如下解决方案:
在idea中打开终端,view->terminal
输入如下命令,名字和你的邮箱需要修改。

git commit -m "add README" --author="user <user@mail.com>"

但是我的用户名和密码已经改过了,在idea中运行报如下错误。
在这里插入图片描述
报错信息说是让我配置环境变量,我想着应该不是这块的问题,所以我就没配置,哈哈。
于是我又尝试了第二种方式:
打开本地项目所在文件夹,右键选择Git Bash Here,在终端中输入命令:git commit -m "这里填写你提交的注释信息",然后点击回车,发现提交上去了。
接下来就是push。
在idea中点击push按钮,输入url,用户名和密码即可push上去啦。

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

idea报错:fatal: –author ‘user@mail.com’ is not ‘Name ’ and matches no existing author 的相关文章

随机推荐