Open-source Languages & Tools for z/OS

 View Only

 Where can we change location Git system config location

Dirk Thielens's profile image
Dirk Thielens posted 05-08-2023 05:32

We are testing upgrade in our Jenkins development environment with following version changes

 

Jenkins Master version from v2.346.2 to 2.387.1

Git client plugin from v3.11.2 to v4.2.0

  

Git Version z/OS not changed 2.14.4_zos_b09

 

We have setup up Jenkins Agent as a started task

Setting up the CI Pipeline Agent on IBM Z as a Started Task

 

We see following errors

 

Jenkins Console:

 

org.eclipse.jgit.errors.InvalidObjectIdException: Invalid id: fatal: bad config line 1 in file .git/config

 

 

STDERR info Jenkins Slave Started Task z/OS:

 

Exception caught during execution of command '<gitInstallFolder>/git/bin/git, config, --system, --edit¨' in '<gitInstallFolder>/git/bin', return code '128',

error message 'fatal: Invalid path '/rsusr': EDC5129I No such file or directory.  

 

Check System config location

When we check system config information we receive following error

git config --list --system

 

fatal: unable to read config file '/rsusr/ported/etc/gitconfig': EDC5129I No such file or directory.

 

Question

Where can we change /rsusr/ported location -> not present on our system

Adam Britt's profile image
Adam Britt

According to the documentation it is always relative to the installation path - "The first place Git looks for these values is in the system-wide [path]/etc/gitconfig file, which contains settings that are applied to every user on the system and all of their repositories. " - https://git-scm.com/book/en/v2/Customizing-Git-Git-Configuration

This is also the case for our installation, although we are on a much newer version of git than you have (2.26.2-87).

Maybe something was different in the older version. It is probably a good idea to update your git installation as it is several years old and has several known vulnerabilites. A little heads- upgrading might be painful if you have ISO8859-1 characters > 128 due to a change from ISO8859-1 to UTF8.

Sergey Rezepin's profile image
ROCKETEER Sergey Rezepin

Hi Dirk,

Please take a look on the following page:
https://git-scm.com/docs/git-config/2.25.0#Documentation/git-config.txt-GITCONFIG

You can try to re-configure default path to ginconfig file by setting the GIT_CONFIG or skip reading it by using GIT_CONFIG_NOSYSTEM environment variable.

Please note that the Rocket port of git 2.14.4 is not supporting. Currently we are supporting git 2.26.2 only.

Thanks,
Sergey

Dirk Thielens's profile image
Dirk Thielens

Thanks Adam an Britt 

We are planning install more recent version and will check with provided info if we can solve the problem