Submodule repository checkout option "SSH key applies to submodules" does not work for windows remote agent.

XMLWordPrintable

    • 5
    • Severity 3 - Minor

      Summary

      When using source code checkout task for bitbucket repository with submodules in bamboo on Windows(with windows remote agent), the source code checkout task for submodule fails when SSH key applies to submodules option is enabled in the bamboo linked repository.

      How to Replicate

      1. Install Bamboo on windows machine and configure windows remote agent(with git capability).
      2. Create a repository in bitbucket server with submodule/submodules.
      3. Link the bitbucket repository with use submodule and SSH key applies to submodules options enabled.
      4. Make sure the .gitmodule file URL has absolute path for the submodule repository and not relative path.(generally default is absolute path)
      5. Create a build job with source code checkout task for the repository.
      6. Source code checkout task which makes use of the temp key copied from bamboo server fails for the submodule git checkout task with below error:
         Load key "C:\\Windows\\Temp\\pkey5326356327362343169.tmp": error in libcrypto 

      Expectation:

      Source code checkout task for the submodule repository should be successful.

      Workaround:

      • Disable the option SSH key applies to submodules in the Linked repository.
      • Modify the .gitmodule file to make use of the relative path of the submodule repository with respect to the primary repository. Ex :
      • [submodule "submodule_repo"]
         path = submodule_repo
         url = ssh:../../project_of_submodulerepo/submodule_repo.git 
      • This will make use of Bamboo-SSH-proxy for submodule authentication instead of the temporary private key file that is copied from bamboo sever to windows remote agent.

       

      POST CLOSURE - READ THIS

      This is not a Bamboo bug, but customers are still affected.

      The problem is related to this Git for Windows issue:

      The workaround is to use a different OpenSSH client on the Bamboo Agent, avoiding the one that is bundled with Git for Windows. For that, customers must install a different OpenSSH client such as the native Windows OpenSSH client, or Chocolatey's, and modify Windows' PATH environment to list the OpenSSH's client folder before the one bundled with Git for Windows.

      Bamboo's Elastic Agent Windows Stock Images use Git for Windows, and will manifest the issue. Customers are advised to create a customised Elastic Image address the issue and use a different OpenSSH version.

      The Bamboo versions announced in the "Fix Version/s" field of this ticket contain a fix for the issue.

       

              Assignee:
              Eduardo Alvarenga (Inactive)
              Reporter:
              Ayrijit Swain
              Votes:
              1 Vote for this issue
              Watchers:
              9 Start watching this issue

                Created:
                Updated:
                Resolved: