You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am using the new sparseCheckoutDirectories under my checkout tasks. When used in conjunction with fetchFilter: blob:none (or fetchFilter: tree:0), helps to exclude and trim back all unnecessary files and keep the checkout download size to a minimum. However, I've noticed that if I amend sparseCheckoutDirectories to include an additional directory AFTER the pipeline has already been run on the target environment, then we will receive the following error:
git sparse-checkout set MyFolder1 MyFolder2
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Password for 'https://****@dev.azure.com'/: terminal prompts disabled
fatal: could not fetch **** from promisor remote
##[error]Git sparse checkout failed with exit code: 128
No clue why it's prompting for credentials in the first place...
Since our deployment agents are self-hosted and persist the working directory in-between runs, I have to manually go into the server and wipe the repo folder to get this to work. I have tried various combinations of settings, included clean: true, however the error will ALWAYS persists, unless I either a) delete the target repo folder prior to checkout task, or b) reset the task back to it's original settings (which of course is moving backwards from the goal).
From my testing, if I exclude the fetchFilter from the start, then subsequent changes will work without issue. However the goal here is to minimize the size of the checked out repo and hidden pack files. In my particular scenario, one folder has several 100mb blobs which also tend to increase the hidden pack folder, even when using sparse-checkout. So to optimize, we must use the combination of a filter and sparse-checkout.
Honestly, the main issue here is that the agent work folder for this pipeline remains in a broken state after the first run. I would have expected that clean option to have helped, however I don't see it doing anything. After that first run executes, it seems impossible to even load the full repo (again w/o deleting repo folder). For example , this still fails after the first run (notice how filter and sparse-checkout are excluded):
Issue #5113 claims something somewhat similar, however w/o more logs/details, I suspect the core issue is different. The fix suggested in that issue (adjusting order of fetch/sparse commands) has already been shipped with my agent's version.
Environment type (Please select at least one enviroment where you face this issue)
Self-Hosted
Microsoft Hosted
VMSS Pool
Container
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Microsoft Windows Server 2019 Version 1809 (OS Build 10.0.17763.5458)
Version controll system
Azure Git
Relevant log output
Starting: Checkout AzurePipelinesScripts@main to repo-folder/
==============================================================================
Task : Get sources
Description : Get sources from a repository. Supports Git, TfsVC, and SVN repositories.
Version : 1.0.0
Author : Microsoft
Help : [More Information](https://go.microsoft.com/fwlink/?LinkId=798199)
==============================================================================
Syncing repository: AzurePipelinesScripts (git)
Prepending Path environment variable with directory containing 'git.exe'.
git version
git version 2.47.0.windows.2
git lfs version
git-lfs/3.4.0 (GitHub; windows amd64; go 1.20.6; git d06d6e9e)
git config --get remote.origin.url
git clean -ffdx
git reset --hard HEAD
HEAD is now at 71e6b15 Dummy push for Pipeline
git sparse-checkout init --cone
git sparse-checkout set MyFolder1 MyFolder2
fatal: Cannot prompt because terminal prompts have been disabled.
fatal: could not read Password for'https://****@dev.azure.com': terminal prompts disabled
fatal: could not fetch **** from promisor remote
##[error]Git sparse checkout disable failed with exit code: 128
Finishing: Checkout AzurePipelinesScripts@main to repo-folder/
The text was updated successfully, but these errors were encountered:
What happened?
I am using the new
sparseCheckoutDirectories
under my checkout tasks. When used in conjunction withfetchFilter: blob:none
(orfetchFilter: tree:0
), helps to exclude and trim back all unnecessary files and keep the checkout download size to a minimum. However, I've noticed that if I amendsparseCheckoutDirectories
to include an additional directory AFTER the pipeline has already been run on the target environment, then we will receive the following error:No clue why it's prompting for credentials in the first place...
Example checkout task (first run = success):
Example modified checkout task (second run = fails):
Since our deployment agents are self-hosted and persist the working directory in-between runs, I have to manually go into the server and wipe the repo folder to get this to work. I have tried various combinations of settings, included
clean: true
, however the error will ALWAYS persists, unless I either a) delete the target repo folder prior to checkout task, or b) reset the task back to it's original settings (which of course is moving backwards from the goal).From my testing, if I exclude the
fetchFilter
from the start, then subsequent changes will work without issue. However the goal here is to minimize the size of the checked out repo and hidden pack files. In my particular scenario, one folder has several 100mb blobs which also tend to increase the hidden pack folder, even when using sparse-checkout. So to optimize, we must use the combination of a filter and sparse-checkout.Honestly, the main issue here is that the agent work folder for this pipeline remains in a broken state after the first run. I would have expected that clean option to have helped, however I don't see it doing anything. After that first run executes, it seems impossible to even load the full repo (again w/o deleting repo folder). For example , this still fails after the first run (notice how filter and sparse-checkout are excluded):
Issue #5113 claims something somewhat similar, however w/o more logs/details, I suspect the core issue is different. The fix suggested in that issue (adjusting order of fetch/sparse commands) has already been shipped with my agent's version.
Versions
Environment type (Please select at least one enviroment where you face this issue)
Azure DevOps Server type
dev.azure.com (formerly visualstudio.com)
Azure DevOps Server Version (if applicable)
No response
Operation system
Microsoft Windows Server 2019 Version 1809 (OS Build 10.0.17763.5458)
Version controll system
Azure Git
Relevant log output
The text was updated successfully, but these errors were encountered: