简体   繁体   中英

Git Submodule checkout for downloaded git repository as an artifact

The scenario is related to the Azure DevOps pipeline. We are checking out the repo in one of the jobs and building the solution. Post archiving the repo+binaries, we are publishing that as an Artifact.

Now, this artifact is getting downloaded on another job (separate agent) and we want to check out the submodule (git submodule update) on this new agent without checking out the repo again.

Can anyone suggest something here? We tried git init/ git submodule init before git submodule update and nothing worked.

FYI.. the submodule update command works fine if we check out our repository.

We could checkout submodules via below cmd:

git -c http.https://<url of submodule repository>.extraheader="AUTHORIZATION: basic <BASE64_ENCODED_TOKEN_DESCRIBED_ABOVE>" submodule update --init --recursive

Please refer this link for more details.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM