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

Problem under Windows .gitconfig vs. gitconfig


    • 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:


      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


          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.




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


              • Created: