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

其他回答

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

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

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

我希望这能有所帮助。

如果你发现旧的默认行为很有用(即使用本地用户名和主机名作为作者标识,而不是识别你的人),你可以运行:

git config --global user.name "$USER" && git config --global user.email "$USER@$HOSTNAME"

对我来说,问题是网络连接,一旦我重新连接到我的wifi,它就可以获取详细信息并提交,没有任何问题。

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

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

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