title: Jenkins: Retrieving submodules with Git
body: <p>Currently I've been stuck on an issue trying to retrieve the submodules of a repository from within Jenkins. My configuration is fine and I can pull repositories without any submodules just fine. </p>
  
  <p>I can also pull the main components of a repo with submodules (both with authentication in the repository-name as with SSH). The problem only arises when I have to pull the submodule-components. I'm running the latest version of Jenkins and I've added a part at the bottom which is for "Advanced sub-modules behaviours". I selected "Recursively update submodules" here and ran the build several times to no avail.</p>
  
  <p>When I try adding an extra build step at the bottom with shell-commands, the updating of the repositories doesn't work either. When I try these commands outside of jenkins in my terminal, this works just fine. The issue I always get in Jenkins is: </p>
  
  <pre><code>FATAL: Command "git submodule update" returned status code 1:
  
  stdout: 
  
  stderr: Cloning into 'thisismysubmodule'...
  fatal: Authentication failed for 'https://git.thisismyrepo.com/scm/ap/thisismysubmodule.git/'
  </code></pre>
  
  <p>I've found this issue: <a href="https://issues.jenkins-ci.org/browse/JENKINS-20941">https://issues.jenkins-ci.org/browse/JENKINS-20941</a> but I can't use the suggested solution at the bottom due to security concerns. Does anyone here have any experience with this problem or a possible solution?</p>