我有应用程序服务器,我使用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配置文件。

执行以下命令: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命令和探索我认为可行的东西之前,对我的项目文件进行备份,在很多情况下挽救了我的生命。

其他回答

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

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

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

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

恕我冒昧,解决这个错误的正确方法是配置你的全局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命令和探索我认为可行的东西之前,对我的项目文件进行备份,在很多情况下挽救了我的生命。

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

git config -l