0

If I try and do any command under Team -> Git I get the following error

Java.io.IOException: User config file /home/user/.gitconfig invalid org.eclipse.jgit.errors.ConfigInvalidException: Cannot read file /home/user/.gitconfig

the file is there, has my github username and email that's it and I made the permissions 777

I'm using netbeans 8.0 and the excellent ubuntu 14.0.1 desktop Anyone know how to solve it please.

.gitconfig contents is

           name=Gav
           [email protected]




         [user]
            email = [email protected]
            name = Gav
3
  • Can you paste the contents of /home/user/.gitconfig in your question? Commented Aug 24, 2014 at 12:07
  • sorry I just realised I'm a dumb ass and somehow those 2 top lines got in there somehow, thought it was strange but didn't question the logic, then seen the correct way is just > [user] email = [email protected] name = Gav
    – GAV
    Commented Aug 24, 2014 at 16:36
  • @GAV I have edited my answer with the right content
    – VonC
    Commented Aug 24, 2014 at 16:38

1 Answer 1

1

It depends on the exact content of the .gitconfig:

  • either it contains some unknown option or typo (as in this thread),
  • or, as in this Netbeans issue, it isn't saved in the right format (for instance, UTF-8 with BOM instead of the normal UTF-8 without BOM).

In the OP's case, the first two lines are incorrect.
It should be only:

     [user]
        email = [email protected]
        name = Gav

Not the answer you're looking for? Browse other questions tagged or ask your own question.