Keep getting Invalid author specified. Example: A U Thor <author@example.com>

不问归期 提交于 2019-12-10 02:06:45

问题


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:

Invalid author specified. Example: A U Thor <author@example.com>

when, I copy and paste A U Thor <author@example.com> 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?

Similar problem happens with committer box. I get:

Invalid committer specified. Example: C O Mitter <committer@example.com>

回答1:


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

The next commit from eGit will work.




回答2:


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

Those settings should be enteredd in a configuration entry:

The function which calls the parsing is 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).




回答3:


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.

In our company environment that has led to some confusion as they are stored as Jon.Doe@example.com in the LDAP server, but most people tried jon.doe@example.com with egit and got exactly your error messages.

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.




回答4:


Look at the message you are getting:

Invalid author specified. Example: A U Thor <author@example.com>

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 <bond@unknown.com>

You can do the same in both rows.




回答5:


You have to fill out below of form.

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

Author : davidLEE
Committer : davidLEE



来源:https://stackoverflow.com/questions/11176914/keep-getting-invalid-author-specified-example-a-u-thor-authorexample-com

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!