I am trying to set up my pipeline to only checkout specific folders related to a project so that I can reduce the checkout time.
I am using the following code found on many other questions but I cannot seem to get it to work.
- script: |
cd $(Build.SourcesDirectory)
git init
git remote set-url origin $(Build.Repository.Uri)
git config core.sparsecheckout true
echo STARS/Source/ >> .git/info/sparse-checkout
git pull origin $(Build.SourceBranch)
displayName: 'Project Specific Checkout'
env:
SYSTEM_ACCESSTOKEN: $(System.AccessToken)
I keep getting the following error in the logs:
Reinitialized existing Git repository in C:/Agent001/_work/20/s/.git/
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Password for 'https://organization@dev.azure.com/...': terminal prompts disabled
I cannot seem to work out how to enable terminal prompts.
Update:
Based on @Repcak comment I updated my code but still receiving the terminal prompts have been disabled
error.