title: Jenkins Failed to connect to gitlab port 443
body: <p>I try to connect to the gitlab from Jenkins and I keep getting this error:</p>
  
  <pre><code>Started by user Marko Zadravec
  Building in workspace /var/jenkins_home/...
  using credential ...
   &gt; git rev-parse --is-inside-work-tree # timeout=10
  Fetching changes from the remote Git repository
   &gt; git config remote.origin.url https://gitlab.xxxx.git # timeout=10
  Fetching upstream changes from https://gitlab.xxxx.git
   &gt; git --version # timeout=10
  using GIT_ASKPASS to set credentials new correct
   &gt; git fetch --tags --progress https://gitlab.xxxx.git +refs/heads/*:refs/remotes/origin/*
  ERROR: Error fetching remote repo 'origin'
  hudson.plugins.git.GitException: Failed to fetch from https://gitlab.xxxx.git
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:894)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1161)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1192)
      at hudson.scm.SCM.checkout(SCM.java:504)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1208)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:574)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:499)
      at hudson.model.Run.execute(Run.java:1819)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:97)
      at hudson.model.Executor.run(Executor.java:429)
  Caused by: hudson.plugins.git.GitException: Command "git fetch --tags --progress https://gitlab.xxxx.git +refs/heads/*:refs/remotes/origin/*" returned status code 128:
  stdout: 
  stderr: fatal: unable to access 'https://gitlab.xxxx.git/': Failed to connect to gitlab.xx.si port 443: Connection timed out
  
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:2042)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1761)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$400(CliGitAPIImpl.java:72)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:442)
      at hudson.plugins.git.GitSCM.fetchFrom(GitSCM.java:892)
      ... 11 more
  ERROR: Error fetching remote repo 'origin'
  Finished: FAILURE
  </code></pre>
  
  <p>But, if run the command in terminal on the same machine on witch Jenkins is installed,...</p>
  
  <pre><code>git fetch --tags --progress https://gitlab.xxxx.git +refs/heads/*:refs/remotes/origin/*
  </code></pre>
  
  <p>it is working,...</p>
  
  <h2>EDIT:</h2>
  
  <p>For git I use User and a password</p>
  
  <p><a href="https://i.stack.imgur.com/Ykf9H.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Ykf9H.png" alt="enter image description here"></a></p>
  
  <h2>EDIT 2</h2>
  
  <p>I now found out, that fetching git stop working on all my previous projects,... 
  I suspect that this mean that user is not a problem, but something else,...</p>
  
  <p>Do anyone have some idea where to look for problem?</p>