title: git fetch error when fetching on jenkins script
body: <p>I'm having issue fetching code from <strong>HTTPS</strong> gitlab using jenkins pipeline, it's giving me error timeout as below. I don't have any issue fetching repo from <strong>HTTP</strong> gitlab server.</p>
  <p>NOTE:</p>
  <ol>
  <li>My jenkins server and <strong>HTTPS</strong> gitlab server are in the internal network, and I have cleared the network firewall.</li>
  <li>No issue accessing the <strong>HTTPS</strong> gitlab webpage via browser.</li>
  <li>No issue when fetching repo from my <strong>HTTP</strong> gitlab server.</li>
  <li>My <strong>HTTPS</strong> gitlab server is using self signed cert.</li>
  </ol>
  <p>Below are the error messages in jenkins console output, I have masked the git repo URL for confidential purpose.</p>
  <pre><code>ERROR: Error cloning remote repo 'origin'
  hudson.plugins.git.GitException: Command &quot;git fetch --tags --progress https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.git +refs/heads/*:refs/remotes/origin/*&quot; returned status code 128:
  stdout: 
  stderr: fatal: unable to access 'https://xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx.git/': Operation timed out after 300042 milliseconds with 0 out of 0 bytes received
  
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2671)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:2096)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$500(CliGitAPIImpl.java:84)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:618)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:847)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1224)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1302)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep.checkout(SCMStep.java:129)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:97)
      at org.jenkinsci.plugins.workflow.steps.scm.SCMStep$StepExecutionImpl.run(SCMStep.java:84)
      at org.jenkinsci.plugins.workflow.steps.SynchronousNonBlockingStepExecution.lambda$start$0(SynchronousNonBlockingStepExecution.java:47)
      at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:515)
      at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:264)
      at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1128)
      at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:628)
      at java.base/java.lang.Thread.run(Thread.java:829)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] stage
  [Pipeline] { (Build)
  Stage &quot;Build&quot; skipped due to earlier failure(s)
  [Pipeline] }
  [Pipeline] // stage
  [Pipeline] }
  [Pipeline] // withEnv
  [Pipeline] }
  [Pipeline] // node
  [Pipeline] End of Pipeline
  ERROR: Error cloning remote repo 'origin'
  Finished: FAILURE
  </code></pre>
  <p>I would appreciate the help if anyone encountered the same and how you guys resolve it. Thanks</p>