美文网首页
Git错误 Please tell me who you are

Git错误 Please tell me who you are

作者: 生命不止运动不息 | 来源:发表于2022-06-13 23:40 被阅读0次

git提交时,错误如下

*** Please tell me who you are.

Run

  git config --global user.email "you@example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'billanderson@bogon.(none)')

解决方法

第一种 ,直接设置全局的用户

git config --global user.email "you@example.com"
git config --global user.name "Your Name"

第二种,为项目单独设置

因我的电脑有多个git账户,所以不想通过设置全局邮箱和名字来解决。

进入到项目目录,找到 .git 文件夹,进入到里面,打开config文件。
添加如下三行

[user]
name = XXX(自己的名称)
email = XXXX(邮箱)
image.png image.png

参考文章

https://blog.csdn.net/qq_46036214/article/details/116275598

相关文章

网友评论

      本文标题:Git错误 Please tell me who you are

      本文链接:https://www.haomeiwen.com/subject/lbptvrtx.html