checkout icon indicating copy to clipboard operation
checkout copied to clipboard

git-auth-helper causes failure to update with stray submodule commit object without matching module in .gitmodules.

Open ScatteredRay opened this issue 4 years ago • 2 comments

So, we have a submodule that we deleted and somehow will get re-added at times. This causes a build failure, the problem however, is even once it's removed, or with other branches continue to get failures due to a problem with git-auth-helper.

To reproduce, create a repository with a submodule. Setup a github action with a actions/checkout step with a token property to auth to a private git repository. Delete the information about the submodule in the .gitmodules file, and submit that commit to build with GHA. Notice the error:

  "C:\Program Files\Git\cmd\git.exe" config --local --name-only --get-regexp core\.sshCommand
  "C:\Program Files\Git\cmd\git.exe" submodule foreach --recursive "git config --local --name-only --get-regexp 'core\.sshCommand' && git config --local --unset-all 'core.sshCommand' || :"
  Error: fatal: No url found for submodule path '<Path>' in .gitmodules
  Error: The process 'C:\Program Files\Git\cmd\git.exe' failed with exit code 128```

Now delete the submodule, and make a new commit, note the repository is now stuck and cannot update.

ScatteredRay avatar Sep 13 '21 21:09 ScatteredRay

I have this same issue.

mikebrandl avatar Sep 16 '21 22:09 mikebrandl

Assuming you aren't using self-hosted, this is probably a duplicate of #354 (there's a second bug for self-hosted issues).

jsoref avatar Aug 22 '22 19:08 jsoref