Skip to main content

Clone Submodules via SSH

This tutorial explains how to clone submodules with SSH protocol in build job

  1. For submodules reside on OneDev server, make sure they are referenced using same host as specified in SSH root url in system setting

  2. Make sure you can clone all the submodules locally in your terminal. To make it working, you will need to add public key (normally content of file ~/.ssh/ to your account and make sure your account has permission to pull all submodule projects

    Add Ssh Key

  3. Edit build setting of the main project to define a job secret containing your private key (normally content of file ~/.ssh/id_rsa)

    Add Private Key

  4. Configure checkout step of the job to use SSH credential and specify secret defined above as private key

    Checkout With Ssh