我有应用程序服务器,我使用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 --local user.email "AppServer@your_domain.something"
#git config --local ...
git stash
#optionally unset to minimize risk of fake user commits ...
#esp if someone other than you uses the repo too
git config --local --unset user.email
#git config --local --unset ...

我没有git拉的错误,所以我不能测试这是否会有帮助,然后

另请参阅

git配置的优先级是什么?

我的Git配置中的设置是从哪里来的?

其他回答

在我的例子中,正如查德上面所说,我在“电子邮件”这个词上缺少了“e”,但我看到你不是这样的。请按以下命令查看是否一切都按预期拉动。

git config -l

我也遇到了同样的问题,通过添加默认名称和电子邮件存储库设置解决了这个问题。

正如多伦所建议的——

如果您正在使用sourcetree: Repository -> Repository Settings -> Advanced ->取消勾选“使用全局用户设置”框。

添加默认用户名和邮箱地址。

Git pull不需要这个。 然而,如果拉操作导致合并冲突,那么它似乎是必要的。

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

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