Git 吉特:“;请告诉我你是谁;错误
我有一些应用服务器,我使用Chef+一些特别的bash脚本将它们引导到一起。问题是,当我想在其中一个应用程序服务器上运行更新时,我会得到:Git 吉特:“;请告诉我你是谁;错误,git,Git,我有一些应用服务器,我使用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 pu
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
?是否有任何方法可以覆盖此行为,以便在未设置名称和电子邮件时不会出错?更新引导过程以创建包含正确内容的${HOME}/.gitconfig
,或从某处复制现有的引导过程
每次更新应用服务器时,我是否真的需要将其设置为执行简单的git pull原始主机?是否仍有覆盖此行为的方法,以便在未设置名称和电子邮件时不会出错
它只会询问一次,并确保此计算机的rsa公钥已添加到您试图提交或传递请求的github帐户上
有关这方面的更多信息,请参见:您可以执行以下操作,而不是执行
git pull
:
git fetch
git reset --hard origin/master
这两种方法都不需要您配置git用户名/电子邮件
这将销毁任何未提交的本地更改/提交,并使您的头部指向提交(而不是分支)。但对于应用服务器来说,这两个都不是问题,因为您不应该进行本地更改或提交到该存储库。如果您使用的是sourcetree:repository->repository Settings-->Advanced-->取消选中“使用全局用户设置”框
对我来说效果很好。当我调用PHP脚本到
init
和commit
到git时,我花了很多时间在上面。
我发现工作流程应该是:
git init
git config user.name“someone”
git config user.email”someone@someplace.com“
git add*
git提交-m“some init msg”
我希望这会有所帮助。这是一条错误消息:
git pull
在cmd行上运行良好git pull
在Perl CGI进程(从github自动部署的webhook)中失败,出现上述错误
执行git status
识别出一个冲突文件。排序解决了这个问题
后来当我更改一些配置设置时,问题再次出现
这次,设置$HOME和$USER env VAR修复了它(在CGI过程中默认未设置)我在尝试提交一些文件时遇到了此错误消息
只需运行git fetch,然后再次尝试提交就行了。这是一个打字错误。您不小心将“user.mail”设置为不带“e”。通过使用在全局配置中设置“user.email”来修复此问题 git config--global user.email“you@example.com" 在这里找到了解决方案
查看配置文件 存储库>存储库设置>编辑配置文件 检查
[user]
部分是否存在。如果缺少用户部分,请添加它
示例:
[user]
name = "your name"
email = "your email"
我也遇到了同样的问题,通过添加默认名称和电子邮件存储库设置解决了这个问题 正如多伦建议的那样-
如果您使用的是sourcetree:Repository->Repository Settings-->Advanced-->取消选中“使用全局用户设置”框
添加默认名称和电子邮件地址。它适合我,试试这个。。 您需要为终端配置远程访问
git config --global user.name "abc"
git config --global user.email "abc@example.com"
这对我来说非常有效。对我来说,问题是网络连接,一旦我重新连接到我的wifi,它可以获取详细信息并提交,而不会出现任何问题。要解决问题,我使用:git config--global user.email“you@example.com“而且有效 user.mail不工作,可能需要输入一个E.Typo?在我的例子中,正如Chad所说,我在“email”一词中遗漏了“E”,但我发现你的情况并非如此。请点击下面的命令,查看是否一切正常
git config -l
我使用heroku cli
1.必须使用所有用户名和用户电子邮件
$git config--global user.email.login email
$git config--全局user.name.heroku名称
你必须这样写你的电子邮件
git config --global user.email "you@example.com"
然后:写用户名
git config --global user.name "Your Name"
之后将出现Poupup窗口
写用户名和电子邮件获取您想要贡献的帐户我使用Jenkins,在尝试执行发布(需要git提交)时遇到此问题。为了解决这些问题,我需要添加一个自定义用户名/电子邮件地址(见图),这确保在签出代码时,在执行发布时使用我的构建用户名/电子邮件地址。注意,此配置可从Jenkins Multibranch Pipeline项目配置中获得。
git pull
不需要此配置。
但是,如果拉操作导致合并冲突,那么它似乎是必需的。IMHO,解决此错误的正确方法是配置全局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 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.email设置告诉git您是谁,因此随后的git commit
命令
[core]
whitespace = space-before-tab,-indent-with-non-tab,trailing-space
$ 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 config user.email "someone@gmail.com"