Race condition between concurrent Task processes when cloning remote Git Taskfiles
Author: QuentinBtdCreated Aug 31, 2026Updated Sep 18, 2026
Labelsarea: includes
Description
Description
Task intermittently fails while cloning a remote Git Taskfile when multiple Task processes run concurrently.
This occurs in normal development workflows, where Task may be invoked by an IDE extension, shell completion, or another terminal at the same time.
Error
failed to clone repository: error downloading 'https://example.com/example.git?depth=1&ref=v1.2.0': /usr/bin/git exited with 128: Cloning into '/private/tmp/task-git-repos/git/<repository-cache-key>'...
error: could not lock config file /private/tmp/task-git-repos/git/<repository-cache-key>/.git/config: No such file or directory
error: could not lock config file /private/tmp/task-git-repos/git/<repository-cache-key>/.git/config: No such file or directory
fatal: could not set 'core.repositoryformatversion' to '0'Example Taskfile
version: '3'
includes:
remote:
taskfile: https://example.com/example.git//tasks/example/taskfile.yaml?ref=v1.2.0Steps to reproduce
- Clear the remote Taskfile cache so that the Git repository needs to be cloned.
- Run multiple Task processes concurrently:
task --list &
task --list &
wait- Repeat if necessary, as the failure is intermittent.
Expected behavior
Concurrent Task processes should resolve the remote Git Taskfile successfully.
Actual behavior
One or more processes intermittently fail during Git repository initialization because .git/config is no longer present.
Environment
- Task version:
3.53.1 - Operating system: macOS
- Architecture: arm64
- Remote Taskfile transport: Git over HTTPS
Version
3.53.1
Operating system
macOS
Experiments Enabled
No response
Example Taskfile
version: '3'
includes:
remote:
taskfile: https://example.com/example.git//tasks/example/taskfile.yaml?ref=v1.2.0Source: go-task/task