-
Bug
-
Resolution: Unresolved
-
Minor
-
Jenkins ver. 2.60.1
Git client 3.6.4
Git for windows
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)
- 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.
[JENKINS-48542] Problem under Windows .gitconfig vs. gitconfig
Assignee | Original: Mark Waite [ markewaite ] |
Description |
Original:
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 [ *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. |
New:
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 *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. |
JENKINS-47832reported a behavioral difference between bin\git.exe and mingw64\git.exe. The mingw64 variant of the git executables is not tested with the Jenkins git plugin.Does it behave any better if you use D:\TOOLS\Git\bin\git.exe as the git executable rather than the mingw64 variant?