Context: It is mentioned that Git Credential Managers or Personal Access Tokens is recommended to securely connect to Azure DevOps (SSH would shortly be disabled by security.). Our repository is very large and has a lot of history. Cloning a repository takes time, hence, using "Sync sources" in VSO Build Pipelines delays the pipeline by ~10 minutes. We wanted ability to download parts of source-code (vso git) during VSO build pipelines execution.
Ask: git archive could be used to download specific sub-folders of git repo directly from remote, without a full git clone. How can we download zip/tar from DevOps Git for specific subFolder without git clone & SSH protocol? How could we use the recommended PAT token/ AzureCredManager with git archive remote?
Refs:
git archive --remote="https://<repo>" <branch> <subFolder>
fatal: operation not supported by protocol
- https://askubuntu.com/a/1074185/601430 git clone with filter, however, there is no documentation on how to enable the preReq settings [uploadpack.allowfilter, uploadpack.allowanysha1inwant] on DevOps Git server.
- sparse-checkout requires download of git remote add/indexes, which is still costly.