我有应用程序服务器,我使用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 --global user.email "you@example.com"

然后:写用户名

 git config --global user.name "Your Name"

弹出窗口后将出现

写用户名和电子邮件的帐户,你想贡献

其他回答

我使用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

要设置this/current repo的配置,只需删除——global并设置名称/电子邮件,如下所示:

$ git config user.name "John Doe" 
$ git config user.email "JohnDoe@gmail.com" 

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

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

这里找到了解

https://stackoverflow.com/a/14662703

更新引导过程以创建${HOME}/。使用适当的内容,或者从某个地方复制一个现有的Gitconfig。

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

这对我来说很有效。