: fatal: No url found for submodule path 'xyz' in .gitmodules Error: The process '/usr/bin/git' failed with exit code 128
Did you managed to solve? I tried execute:
git rm --cached
But I got the error again.
I have the same issue. Any ideas/
@huihuiy02 Yes, I managed to fix removing the submodule:
git rm --cached <path_to_submodule>
And push the changes
But the error still happening in the self runner then I needed to remove the workflow folder from _work dir in the github runner home dir.
Thanks, that works for me.
But the error still happening in the self runner then I needed to remove the workflow folder from
_workdir in the github runner home dir.
This seems to be related to the error for us. We are using self-hosted runners.
Wiping the entire _work directory "cures" the issue, though I'm not sure what the problem is. I will be looking into this.
UPDATE: this seems to be related to the fact that we are using this workaround to use a private actions repository for our org. The checkout happening in .github/private-actions is what is causing this issue, at least that's my current theory.
Would this be a suitable patch for src/git-auth-helper.js? It seems it would possibly solve the problem, hopefully not creating new ones.
diff --git a/src/git-auth-helper.ts b/src/git-auth-helper.ts
index 291d83b..6783f47 100644
--- a/src/git-auth-helper.ts
+++ b/src/git-auth-helper.ts
@@ -329,22 +329,24 @@ class GitAuthHelper {
private async removeGitConfig(
configKey: string,
submoduleOnly: boolean = false
): Promise<void> {
if (!submoduleOnly) {
if (
(await this.git.configExists(configKey)) &&
!(await this.git.tryConfigUnset(configKey))
) {
// Load the config contents
core.warning(`Failed to remove '${configKey}' from the git config`)
}
}
- const pattern = regexpHelper.escape(configKey)
- await this.git.submoduleForeach(
- `git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :`,
- true
- )
+ if (this.settings.submodules) {
+ const pattern = regexpHelper.escape(configKey)
+ await this.git.submoduleForeach(
+ `git config --local --name-only --get-regexp '${pattern}' && git config --local --unset-all '${configKey}' || :`,
+ true
+ )
+ }
}
}
Tests are failing with this change. I'm currently looking into what this means.
https://github.com/actions/checkout/issues/354#issuecomment-759282642
This solution worked for our specific usecase, @cosimo could you point out which tests failed ? Perhaps we can check the same.
#354 (comment)
This solution worked for our specific usecase, @cosimo could you point out which tests failed ? Perhaps we can check the same.
Sorry, I did abandon this solution and proposed patch since I discovered it's possible to side-step the whole issue by adding the private actions repository checkout directory to your .gitignore file and that solved all our issues permanently, also when using self-hosted runners.