z/OS Tools & Language

Expand all | Collapse all

Git commands fail due to "bad config line"

  • 1.  Git commands fail due to "bad config line"

    Posted 09-30-2019 09:49

    I get the following errors trying to use Git on z/OS. I’m not sure what’s causing them. It almost seems like maybe an encoding issue like git can’t read the file in UTF-8? I could be completely off base though.

    $git init
    warning: templates not found C
    fatal: bad config line 1 in file /u/users/xxx/git/test/.git/config

    $git config --global --user.name xxxx
    fatal: bad config line 1 in file .git/config

    $git --version
    git version 2.12.0
    $bash --version
    GNU bash, version 4.2.50(49)-release (i370-ibm-openedition)

    These happen even if I delete ~/.git and the .git directory where I am trying to git init

    Anyone seen something like this before and have any suggestions?

    Thanks
    -Chris



  • 2.  RE: Git commands fail due to "bad config line"

    Posted 10-03-2019 01:03

    Hi cboehm91,

    git version 2.14.4 is available for download on customer portal.
    Can you try it?

    Thanks,
    Alex



  • 3.  RE: Git commands fail due to "bad config line"

    Posted 10-04-2019 14:33

    Thanks, we will try installing the new version



  • 4.  RE: Git commands fail due to "bad config line"

    Posted 06-11-2020 12:24

    After some troubleshooting, it seems that for some reason the issue was my home directory which is an NFS type file system. So it was seemingly creating ~/.gitconfig in UTF-8 for some reason we didn’t figure out.

    I changed to a different directory and even with an older version of Git, I was able to init, clone, and do other actions that didn’t require access to user-level config. Commenting for anyone else who ends up with the same problem.