我有应用程序服务器,我使用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吗?是否有任何方法来覆盖这种行为,以便在没有设置姓名和电子邮件时不会出错?


当前回答

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

正如多伦所建议的——

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

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

其他回答

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

它只会问一次,并确保这台机器的rsa公钥已添加到您试图提交或传递拉请求的github帐户上。

更多信息可以在这里找到

我使用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配置文件。

执行以下命令:git config——global -e

将出现一个编辑器,您可以在其中插入默认的git配置。

以下是一些例子:

[user]
    name = your_username
    email = your_username@users.noreply.github.com 
[alias]
    # BASIC
    st = status
    ci = commit
    br = branch
    co = checkout
    df = diff

具体操作请参见自定义Git - Git配置

当你看到这样的命令,git config…

$ git config --global core.whitespace \
    trailing-space,space-before-tab,indent-with-non-tab

... 你可以把它放到你的全局git配置文件中:

[core]
   whitespace = space-before-tab,-indent-with-non-tab,trailing-space

对于一次性配置,你可以使用git config——global user.name 'your_username'

如果你没有全局设置你的git配置,你需要为你在本地使用的每一个git repo这样做。

user.name和user.name。email设置告诉git你是谁,所以后续git提交命令不会报错,***请告诉我你是谁。

很多时候,git建议您运行的命令并不是您应该运行的命令。这一次,建议的命令还不错:

$ git commit -m 'first commit'

*** Please tell me who you are.

Run

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

提示:在我非常熟悉git之前,在运行建议的git命令和探索我认为可行的东西之前,对我的项目文件进行备份,在很多情况下挽救了我的生命。

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

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

这里找到了解

https://stackoverflow.com/a/14662703

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