Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-48542

Problem under Windows .gitconfig vs. gitconfig

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Open (View Workflow)
    • Priority: Minor
    • Resolution: Unresolved
    • Component/s: git-plugin
    • Labels:
    • Environment:
      Jenkins ver. 2.60.1
      Git client 3.6.4
      Git for windows
    • Similar Issues:

      Description

      When the gitconfig is stored with a preceeding . i.e. .gitconfig the plugin has problems to find/read it. I have observed this with the configuration for self-signed ssl certificates, similar to the issue JENKINS-48334

      My Setup

      I have ...

      • git for Windows installed on the Jenkins Server under *D:\TOOLS\Git*
      • jenkins configured so that the git-plugin uses D:\TOOLS\Git\mingw64\bin\git.exe
      • a Bitbucket with a self-signed certificate
      • a Certificate chain ca-chain.pem can be found under D:\TOOLS\Git\mingw64\ssl\certs (contains the full CA-chain required to reconsider the certificate from stash/bitbucket as valid)
      • a .gitconfig file in the home directory of the user who runs jenkins service (let's call him 'jenkinsuser'
      • the .gitconfig file contains the following configuration

      [http]

          sslcainfo = /ssl/certs/ca-chain.pem

          sslVerify = true

      My Observations

      When I (jenkinsuser)

      {{Failed to connect to repository : Command "D:\TOOLS\Git\mingw64\bin\git.exe ls-remote -h https://bitbucket/scm/test/test.git HEAD" returned status code 128: }}
      {{stdout: }}
      stderr: fatal: unable to access 'https://bitbucket/scm/test/test.git ': error setting certificate verify locations: CAfile: D:/TOOLS/Git/mingw64/libexec/ssl/certs/ca-bundle.crt CApath: none

      When I rename the file from .gitconfig to gitconfig Jenkins has no problems.

      The same can be observed if you rename the D:\TOOLS\Git\mingw64\etc\gitconfig to .gitconfig

      Again when calling git form command line the name .gitconfig or gitconfig does not make any difference, both work fine.

        Attachments

          Activity

          papanito Adrian Wyssmann created issue -
          markewaite Mark Waite made changes -
          Field Original Value New Value
          Assignee Mark Waite [ markewaite ]
          papanito Adrian Wyssmann made changes -
          Description When the gitconfig is stored with a preceeding . i.e. .gitconfig the plugin has problems to find/read it. I have observed this with the configuration for self-signed ssl certificates, similar to the issue [JENKINS-48334|https://issues.jenkins-ci.org/browse/JENKINS-48334]

          *My Setup*

          I have ...
           * git for Windows installed on the Jenkins Server under ```D:\TOOLS\Git\```
           * jenkins configured so that the git-plugin uses ```D:\TOOLS\Git\mingw64\bin\git.exe```
           * a Bitbucket with a self-signed certificate
           * a Certificate chain ```ca-chain.pem``` can be found under ```D:\TOOLS\Git\mingw64\ssl\certs``` (contains the full CA-chain required to reconsider the certificate from stash/bitbucket as valid)

           * a .gitconfig file in the home directory of the user who runs jenkins service (let's call him 'jenkinsuser'
           * the .gitconfig file contains the following configuration
          ```

          [http]

              sslcainfo = /ssl/certs/ca-chain.pem

              sslVerify = true

          ```

          *My Observations*

          When I (jenkinsuser)
           * run ```git ls-remote -h https://bitbucket/scm/test/test.git``` all works fine
           * try to setup the reopository URL (SCM Git Plugin) in my jenkins job I get the following error:
          ```

          Failed to connect to repository : Command "D:\TOOLS\Git\mingw64\bin\git.exe ls-remote -h

          [https://bitbucket/scm/test/test.git] HEAD" returned status code 128:

          stdout: 

          stderr: fatal: unable to access '[https://bitbucket/scm/test/test.git] ': error setting certificate verify locations:

            CAfile: D:/TOOLS/Git/mingw64/libexec/ssl/certs/ca-bundle.crt

            CApath: none
          ```

           

           When I rename the file from ```.gitconfig``` to ```gitconfig``` Jenkins has no problems.

           

          The same can be observed if you rename the ```D:\TOOLS\Git\mingw64\etc\gitconfig``` to ```.gitconfig```

           

          Again when calling git form command line the name ```.gitconfig``` or ```gitconfig``` does not make any difference, both work fine.
          When the gitconfig is stored with a preceeding . i.e. .gitconfig the plugin has problems to find/read it. I have observed this with the configuration for self-signed ssl certificates, similar to the issue JENKINS-48334

          *My Setup*

          I have ...
           * git for Windows installed on the Jenkins Server under *D:\TOOLS\Git\*
           * jenkins configured so that the git-plugin uses *D:\TOOLS\Git\mingw64\bin\git.exe*
           * a Bitbucket with a self-signed certificate
           * a Certificate chain *ca-chain.pem* can be found under *D:\TOOLS\Git\mingw64\ssl\certs* (contains the full CA-chain required to reconsider the certificate from stash/bitbucket as valid)

           * a .gitconfig file in the home directory of the user who runs jenkins service (let's call him '*jenkinsuser*'
           * the .gitconfig file contains the following configuration

          {quote}[http]

              sslcainfo = /ssl/certs/ca-chain.pem

              sslVerify = true
          {quote}
          *My Observations*

          When I (jenkinsuser)
           * run *git ls-remote -h [https://bitbucket/scm/test/test.git]* all works fine
           * try to setup the reopository URL (SCM Git Plugin) in my jenkins job I get the following error:

          {{Failed to connect to repository : Command "D:\TOOLS\Git\mingw64\bin\git.exe ls-remote -h [https://bitbucket/scm/test/test.git] HEAD" returned status code 128: }}
          {{stdout: }}
          {{stderr: fatal: unable to access '[https://bitbucket/scm/test/test.git] ': error setting certificate verify locations: CAfile: D:/TOOLS/Git/mingw64/libexec/ssl/certs/ca-bundle.crt CApath: none}}

          When I rename the file from *.gitconfig* to *gitconfig* Jenkins has no problems.

          The same can be observed if you rename the *D:\TOOLS\Git\mingw64\etc\gitconfig* to *.gitconfig*

          Again when calling git form command line the name *.gitconfig or* *gitconfig* does not make any difference, both work fine.

            People

            • Assignee:
              Unassigned
              Reporter:
              papanito Adrian Wyssmann
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated: