I need to work with a self hosted gitlab repository protected by 2 way ssl authentication. So to connect aside git's own credentials, the request to git should come with a client ssl.
From the browser point of view. When the pfx certificate is imported, we can browse with google chrome and mozilla firefox.
The git client on the jenkins' box has been configured with the ssl client though global git config http.sslCert and this is tested and works via command line.I am using jenkins version 2.141
I have also added a new type of credentials to git by uploading a p12 certificate as shown below
But for some reasons jenkins still cannot display a way to choose that client certificate when I clicked on the add button. So I added a new one using a p12 certificate with and without password and both are giving same results. With password I entered the export password in the password field
Using p12 certificate without password
The result for both are just the same while testing connection:
hudson.plugins.git.GitException: Command "git fetch --tags --progress
origin +refs/heads/master:refs/remotes/origin/master --prune" returned
status code 128:
stdout:
stderr: fatal: unable to access
'https://git.theurl.git/': The
requested URL returned error: 400
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2016)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1735)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:72)
at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:420)
at jenkins.plugins.git.GitSCMFileSystem$BuilderImpl.build(GitSCMFileSystem.java:351)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:196)
at jenkins.scm.api.SCMFileSystem.of(SCMFileSystem.java:172)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:108)
at org.jenkinsci.plugins.workflow.cps.CpsScmFlowDefinition.create(CpsScmFlowDefinition.java:67)
at org.jenkinsci.plugins.workflow.job.WorkflowRun.run(WorkflowRun.java:303)
at hudson.model.ResourceController.execute(ResourceController.java:97)
at hudson.model.Executor.run(Executor.java:429)
Finished: FAILURE
I am really out of options. I found a similar post on stackoverflow but that didn't really help. How to get pass this blocker ? Anyone done any recently?