我有应用程序服务器,我使用Chef +一些特别的bash脚本引导在一起。问题是,当我想在这些应用服务器上运行更新时,我得到:

19:00:28: *** Please tell me who you are.

Run

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

我真的需要在每次更新应用服务器时设置简单的git pull origin master吗?是否有任何方法来覆盖这种行为,以便在没有设置姓名和电子邮件时不会出错?


当前回答

git config user.email "insert github email here"
git config user.name "insert github real name here"

这对我来说很有效。

其他回答

我使用heroku cli 1. 必须使用所有用户名和用户电子邮件

$git配置——全局用户。电子邮件。登录电子邮件。

$git配置——global user.name .heroku name。

Git pull [Git url] git init Git add * 5 git commit -m "after config user.name,user email" Git push heroku master

要修复,我使用:git配置——全局用户。发邮件至“you@example.com”即可。

用户。邮件没有工作,可能需要输入一个e错字?

那是打字错误。您不小心设置了“user”。邮件"不带"e"。通过设置“user”来修复它。电子邮件”在全局配置与

Git配置——全局用户。电子邮件“you@example.com”

这里找到了解

https://stackoverflow.com/a/14662703

当我调用PHP脚本初始化并提交到git时,我花了很多时间在它上面。 我发现工作流程应该是这样的:

git init Git配置user.name“某人” Git配置用户。电子邮件“someone@someplace.com” Git add * Git commit -m "some init msg"

如果您交换[23]和1,配置将无法工作。

我希望这能有所帮助。

无法自动检测电子邮件地址。

默认情况下,它采用您的系统用户名,如abc@xyz.none。

所以你需要像下面这样设置你的邮箱:

git config user.email "someone@gmail.com"

设置email后,你可以运行git命令并提交你的更改。

git init Git add * Git commit -m "some init msg"