git 继续指定无效作者。示例:AU Thor <[email protected]>

声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow 原文地址: http://stackoverflow.com/questions/11176914/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me): StackOverFlow

提示:将鼠标放在中文语句上可以显示对应的英文。显示中英文
时间:2020-09-19 07:07:16  来源:igfitidea点击:

Keep getting Invalid author specified. Example: A U Thor <[email protected]>

eclipsegitegit

提问by dublintech

Using Eclipse Indigo and egit, everytime I commit a pop up appears and has my name and email in the author and committer boxes. They look fine. however, egit tells me:

使用 Eclipse Indigo 和 egit,每次我提交时都会出现一个弹出窗口,并在作者和提交者框中显示我的姓名和电子邮件。他们看起来不错。然而,egit 告诉我:

Invalid author specified. Example: A U Thor <[email protected]>
Invalid author specified. Example: A U Thor <[email protected]>

when, I copy and paste A U Thor <[email protected]>into the author box, the message goes away. I can even edit it back to my name and email and it is fine. which makes no sense - what was wrong with it in the first place?

当我复制并粘贴A U Thor <[email protected]>到作者框中时,消息消失了。我什至可以将它编辑回我的姓名和电子邮件,这很好。这是没有意义的 - 首先它有什么问题?

Similar problem happens with committer box. I get:

类似的问题发生在提交箱上。我得到:

Invalid committer specified. Example: C O Mitter <[email protected]>
Invalid committer specified. Example: C O Mitter <[email protected]>

回答by Joshua Fox

Commit from command line: git commit -m "message"

从命令行提交: git commit -m "message"

The next commit from eGit will work.

eGit 的下一次提交将起作用。

回答by VonC

When looking at the org.eclipse.jgit.util.RawParseUtils_ParsePersonIdentTestand the org.eclipse.jgit.util.RawParseUtils#parsePersonIdent()function, I can only imagine some special character or some Git configuration (user.name, user.email) missing.

在查看org.eclipse.jgit.util.RawParseUtils_ParsePersonIdentTestorg.eclipse.jgit.util.RawParseUtils#parsePersonIdent()函数时,我只能想象一些特殊字符或一些 Git 配置(user.name、user.email)丢失的。

Those settings should be enteredd in a configuration entry:

应在配置条目中输入这些设置:

new Entry

新条目

The function which calls the parsing is org.eclipse.egit.ui.internal.dialogs.CommitMessageComponent#checkCommitInfo()

调用解析的函数是 org.eclipse.egit.ui.internal.dialogs.CommitMessageComponent#checkCommitInfo()

If you user name and email are correctly set, then it can be an Egit or JGit bug.
A bit like "bug 377969: EGit rebase does not valide user.name and user.email config properly" (on Linux).

如果您的用户名和电子邮件设置正确,则可能是Egit 或 JGit 错误
有点像“错误 377969:EGit rebase 无法正确验证 user.name 和 user.email 配置”(在 Linux 上)。

回答by Bananeweizen

Are you committing to git directly or to a gerrit review system? At least gerrit has case sensitive mail addresses, so they have to be entered exactly as known by the server.

您是直接使用 git 还是使用 gerrit 系统?至少 gerrit 具有区分大小写的邮件地址,因此必须完全按照服务器已知的方式输入它们。

In our company environment that has led to some confusion as they are stored as [email protected] in the LDAP server, but most people tried [email protected] with egit and got exactly your error messages.

在我们公司的环境中,由于它们以 [email protected] 的形式存储在 LDAP 服务器中,因此导致了一些混乱,但大多数人尝试使用 [email protected] 和 egit 并得到您的错误消息。

Another trivial alternative would be some kind of bogus whitespace at the beginning or end of your author name in the configuration. You might not see it in the error messages. I have seen this kind of error happening when people copied content from a webpage into a rich text editor which stored more than the "pure" text.

另一种微不足道的替代方法是在配置中作者姓名的开头或结尾处出现某种虚假的空白。您可能不会在错误消息中看到它。当人们将网页中的内容复制到存储的不仅仅是“纯”文本的富文本编辑器时,我已经看到这种错误发生。

回答by Ula

Look at the message you are getting:

查看您收到的消息:

Invalid author specified. Example: A U Thor <[email protected]>

Invalid author specified. Example: A U Thor <[email protected]>

It simply means that it wants info in indicated format.

它只是意味着它需要指定格式的信息。

For example, if your name is James Bond then you need to type

例如,如果您的名字是 James Bond,那么您需要输入

James Bond <[email protected]>

James Bond <[email protected]>

You can do the same in both rows.

您可以在两行中执行相同的操作。

回答by Lee david

You have to fill out below of form.

您必须填写以下表格。

Name and e-mail is your account name and e-mail.

姓名和电子邮件是您的帐户名和电子邮件。

Author : davidLEE
Committer : davidLEE

作者:davidLEE
提交者:davidLEE