Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » EGit / JGit » commit-id plugin reports that .gitconfig is invalid
commit-id plugin reports that .gitconfig is invalid [message #1783951] Tue, 20 March 2018 16:23 Go to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 617
Registered: July 2009
Senior Member
I work on a Maven build that uses the git-commit-id plugin. I haven't run this build locally for a while. I recently had to tweak my user.name value in in my $HOME/.gitconfig to reflect corp standards. Today, when I tried to run that build, I saw an error like this:

[ERROR] Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.2.3:revision (get-the-git-infos) on project ...: Could not complete Mojo execution...: Could not initialize repository... User config file ...\.gitconfig invalid org.eclipse.jgit.errors.ConfigInvalidException: Cannot read file ...\.gitconfig: Invalid line in config file -> [Help 1]


Here's the approximate contents of my entire $HOME/.gitconfig file:
[user]
	name = Karr, David (...)
	email = ...@...


I believe the former value of the "name" property was "David M. Karr". What might be happening here?
Re: commit-id plugin reports that .gitconfig is invalid [message #1783959 is a reply to message #1783951] Tue, 20 March 2018 17:25 Go to previous messageGo to next message
David M. Karr is currently offline David M. KarrFriend
Messages: 617
Registered: July 2009
Senior Member
I think I figured this out. jgit was trying to read a file referenced by a Cygwin symlink, which unfortunately will not work.
Re: commit-id plugin reports that .gitconfig is invalid [message #1806101 is a reply to message #1783959] Thu, 02 May 2019 15:10 Go to previous message
himanshu singh is currently offline himanshu singhFriend
Messages: 1
Registered: May 2019
Junior Member
-> I think I figured this out. jgit was trying to read a file referenced by a Cygwin symlink, which unfortunately will not work.

I am facing the same issue.

I sync repositories using google repo tool on Windows 10 and use repo and git over cygwin.

But then the synced repositories are read through Jgit on windows system, then fails with

java.io.IOException: Unknown repository format
at org.eclipse.jgit.internal.storage.file.FileRepository.loadRepoConfig(FileRepository.java:249)
at org.eclipse.jgit.internal.storage.file.FileRepository.<init>(FileRepository.java:192)
at org.eclipse.jgit.storage.file.FileRepositoryBuilder.build(FileRepositoryBuilder.java:92)

Caused by: org.eclipse.jgit.errors.ConfigInvalidException: Cannot read file
Previous Topic:Problem with renaming file
Next Topic:Build and share EGit / JGit
Goto Forum:
  


Current Time: Fri Dec 06 06:26:52 GMT 2019

Powered by FUDForum. Page generated in 0.02243 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top