diff --git a/workflow-steps/checkout/main.ts b/workflow-steps/checkout/main.ts index 4378c6a..dacb75f 100644 --- a/workflow-steps/checkout/main.ts +++ b/workflow-steps/checkout/main.ts @@ -11,11 +11,12 @@ if (process.platform != 'win32') { } execSync('git init .'); execSync(`git remote add origin ${repoUrl}`); +execSync(`echo "GIT_REPOSITORY_URL=''" >> $NX_CLOUD_ENV`); if (depth === '0') { // Fetch all branches and tags if depth is 0 execSync( - 'git fetch --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"', + 'git fetch -c protocol.version=2 --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"', ); } else { // Fetch with specified depth diff --git a/workflow-steps/checkout/output/main.js b/workflow-steps/checkout/output/main.js index fda6540..3fca4d8 100644 --- a/workflow-steps/checkout/output/main.js +++ b/workflow-steps/checkout/output/main.js @@ -10,9 +10,10 @@ if (process.platform != "win32") { } (0, import_child_process.execSync)("git init ."); (0, import_child_process.execSync)(`git remote add origin ${repoUrl}`); +(0, import_child_process.execSync)(`echo "GIT_REPOSITORY_URL=''" >> $NX_CLOUD_ENV`); if (depth === "0") { (0, import_child_process.execSync)( - 'git fetch --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"' + 'git fetch -c protocol.version=2 --prune --progress --no-recurse-submodules --tags origin "+refs/heads/*:refs/remotes/origin/*"' ); } else { const tagsArg = fetchTags ? " --tags" : "--no-tags";