title: Jenkins integration with Github plugin for Private repository
body: <p>I have installed Jenkins in an Azure VM.
  Version - 1.651.2</p>
  
  <p>Path to Git :
  <a href="https://i.stack.imgur.com/MlrV1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/MlrV1.png" alt="enter image description here"></a></p>
  
  <p>Installed Plugins :
  Credentials Plugin - 2.0.7
  Git Hub Credentials Plugin - 0.24
  Git Hub Plugin - 1.19.1
  SSH Credentials Plugin - 1.12</p>
  
  <p><a href="https://i.stack.imgur.com/DJeU1.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/DJeU1.png" alt="enter image description here"></a></p>
  
  <p><a href="https://i.stack.imgur.com/OHtzf.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/OHtzf.png" alt="enter image description here"></a>
  In the repo Url tried both https and ssh with username/password and ssh/private key aswell, still unable to pull from git server.</p>
  
  <p>Console Output :</p>
  
  <pre><code>Started by user anonymous
  Building in workspace C:\Program Files (x86)\Jenkins\workspace\Staging Build
  [WS-CLEANUP] Deleting project workspace...
  [WS-CLEANUP] Done
  Cloning the remote Git repository
  Cloning repository https://github.com/--/--.git
  C:\Program Files\Git\bin\git.exe init C:\Program Files (x86)\Jenkins\workspace\Staging Build # timeout=10
  Fetching upstream changes from https://github.com/---/---.git
  C:\Program Files\Git\bin\git.exe --version # timeout=10
  using GIT_SSH to set credentials 
  using .gitcredentials to set credentials
  C:\Program Files\Git\bin\git.exe config --local credential.username jenkins # timeout=10
  C:\Program Files\Git\bin\git.exe config --local credential.helper store --file=\"C:\Windows\TEMP\git7879671492423343442.credentials\" # timeout=10
  C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/---/---.git +refs/heads/*:refs/remotes/origin/* # timeout=2
  ERROR: Timeout after 2 minutes
  C:\Program Files\Git\bin\git.exe config --local --remove-section credential # timeout=10
  ERROR: Error cloning remote repo 'origin'
  hudson.plugins.git.GitException: Command "C:\Program Files\Git\bin\git.exe -c core.askpass=true fetch --tags --progress https://github.com/---/---.git +refs/heads/*:refs/remotes/origin/*" returned status code -1:
  stdout: 
  stderr: 
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandIn(CliGitAPIImpl.java:1719)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.launchCommandWithCredentials(CliGitAPIImpl.java:1463)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl.access$300(CliGitAPIImpl.java:63)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$1.execute(CliGitAPIImpl.java:314)
      at org.jenkinsci.plugins.gitclient.CliGitAPIImpl$2.execute(CliGitAPIImpl.java:506)
      at hudson.plugins.git.GitSCM.retrieveChanges(GitSCM.java:1057)
      at hudson.plugins.git.GitSCM.checkout(GitSCM.java:1097)
      at hudson.scm.SCM.checkout(SCM.java:485)
      at hudson.model.AbstractProject.checkout(AbstractProject.java:1269)
      at hudson.model.AbstractBuild$AbstractBuildExecution.defaultCheckout(AbstractBuild.java:607)
      at jenkins.scm.SCMCheckoutStrategy.checkout(SCMCheckoutStrategy.java:86)
      at hudson.model.AbstractBuild$AbstractBuildExecution.run(AbstractBuild.java:529)
      at hudson.model.Run.execute(Run.java:1738)
      at hudson.model.FreeStyleBuild.run(FreeStyleBuild.java:43)
      at hudson.model.ResourceController.execute(ResourceController.java:98)
      at hudson.model.Executor.run(Executor.java:410)
  ERROR: null
  Finished: FAILURE
  </code></pre>
  
  <hr>
  
  <p>Note: <a href="https://github.com/--/--.git" rel="nofollow noreferrer">https://github.com/--/--.git</a> 
  I have replace my repo names with --- for security purpose and I have checked urls don't mismatch.
  What is going wrong here? </p>
  
  <p>EDIT :</p>
  
  <p>I am able to clone from gitbash successfully using both ssh and https url.
  <a href="https://i.stack.imgur.com/dKbFh.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/dKbFh.png" alt="enter image description here"></a>
  Added deploy keys in github repo aswell.</p>