Uploaded image for project: 'Jenkins'
  1. Jenkins
  2. JENKINS-47377

GitHub Branch Source should correctly clone submodules

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Unresolved
    • Icon: Major Major
    • None

      Observed Behavior:

      Using github-branch-source plugin, Jenkins detects and attempts to build a repo with a Jenkinsfile. advanced submodule behavior is enabled. It gets as far as cloning down the submodules (which are also private repos under the same account) and fails. Log follows:

      Cloning the remote Git repository
      Cloning repository https://github.com/anchorfree/vpn-sniproxy.git
       > git init /jenkins/workspace/horfree_vpn-sniproxy_master-7W5YHEMAJEKYONQ4KHLIVFWIOSGQLKDT7VDARS2FNXQKZT6YHLTA # timeout=10
      Fetching upstream changes from https://github.com/anchorfree/vpn-sniproxy.git
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
       > git fetch --tags --progress https://github.com/anchorfree/vpn-sniproxy.git +refs/heads/*:refs/remotes/origin/*
       > git config remote.origin.url https://github.com/anchorfree/vpn-sniproxy.git # timeout=10
       > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
       > git config remote.origin.url https://github.com/anchorfree/vpn-sniproxy.git # timeout=10
      Fetching upstream changes from https://github.com/anchorfree/vpn-sniproxy.git
      using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
       > git fetch --tags --progress https://github.com/anchorfree/vpn-sniproxy.git +refs/heads/master:refs/remotes/origin/master
      Checking out Revision bb9de965217374fbef1731e74ed6a390f88e50df (master)
      Enabling Git LFS pull
       > git config core.sparsecheckout # timeout=10
       > git checkout -f bb9de965217374fbef1731e74ed6a390f88e50df
       > git config --get remote.origin.url # timeout=10
      using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
       > git lfs pull origin
      Commit message: "add Jenkinsfile and fix build"
       > git rev-list bb9de965217374fbef1731e74ed6a390f88e50df # timeout=10
       > git remote # timeout=10
       > git submodule init # timeout=10
       > git submodule sync # timeout=10
       > git config --get remote.origin.url # timeout=10
       > git submodule init # timeout=10
       > git config -f .gitmodules --get-regexp ^submodule\.(.*)\.url # timeout=10
       > git config --get submodule.af-bureau.url # timeout=10
       > git config -f .gitmodules --get submodule.af-bureau.path # timeout=10
       > git submodule update --init --recursive af-bureau
      Command "git submodule update --init --recursive af-bureau" returned status code 128:
      stdout: 
      stderr: Cloning into 'af-bureau'...
      Host key verification failed.
      fatal: Could not read from remote repository.
      Please make sure you have the correct access rights
      and the repository exists.
      fatal: clone of 'git@github.com:AnchorFree/af-bureau.git' into submodule path 'af-bureau' failed
      

      Attempting with an https git url:

      Cloning the remote Git repository
      Cloning repository https://github.com/anchorfree/vpn-sniproxy.git
       > git init /jenkins/workspace/horfree_vpn-sniproxy_master-7W5YHEMAJEKYONQ4KHLIVFWIOSGQLKDT7VDARS2FNXQKZT6YHLTA # timeout=10
      Fetching upstream changes from https://github.com/anchorfree/vpn-sniproxy.git
       > git --version # timeout=10
      using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
       > git fetch --tags --progress https://github.com/anchorfree/vpn-sniproxy.git +refs/heads/*:refs/remotes/origin/*
       > git config remote.origin.url https://github.com/anchorfree/vpn-sniproxy.git # timeout=10
       > git config --add remote.origin.fetch +refs/heads/*:refs/remotes/origin/* # timeout=10
       > git config remote.origin.url https://github.com/anchorfree/vpn-sniproxy.git # timeout=10
      Fetching upstream changes from https://github.com/anchorfree/vpn-sniproxy.git
      using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
       > git fetch --tags --progress https://github.com/anchorfree/vpn-sniproxy.git +refs/heads/master:refs/remotes/origin/master
      Checking out Revision d0b3fdd723de2df772020a3e80454d83d1301a5c (master)
      Enabling Git LFS pull
       > git config core.sparsecheckout # timeout=10
       > git checkout -f d0b3fdd723de2df772020a3e80454d83d1301a5c
       > git config --get remote.origin.url # timeout=10
      using GIT_ASKPASS to set credentials Jenkins Global Pipeline Libraries scan credentials
       > git lfs pull origin
      Commit message: "will https submodules Just Work for Jenkins builds?"
       > git rev-list f6e18d076844cf7a2f2e66e528dc9fae0e35c944 # timeout=10
       > git remote # timeout=10
       > git submodule init # timeout=10
       > git submodule sync # timeout=10
       > git config --get remote.origin.url # timeout=10
       > git submodule init # timeout=10
       > git config -f .gitmodules --get-regexp ^submodule\.(.*)\.url # timeout=10
       > git config --get submodule.libtoolz.url # timeout=10
       > git config -f .gitmodules --get submodule.libtoolz.path # timeout=10
       > git submodule update --init --recursive libtoolz
      Command "git submodule update --init --recursive libtoolz" returned status code 128:
      stdout: 
      stderr: Cloning into 'libtoolz'...
      remote: Invalid username or password.
      fatal: Authentication failed for 'https://github.com/AnchorFree/libtoolz.git/'
      fatal: clone of 'https://github.com/AnchorFree/libtoolz.git' into submodule path 'libtoolz' failed
      

      Expected Behavior:

      Jenkins should succeed when cloning submodules when it already has the necessary permissions via the github-branch-source plugin.

       

            Unassigned Unassigned
            ahammond Andrew Hammond
            Votes:
            2 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated: