checkout icon indicating copy to clipboard operation
checkout copied to clipboard

No url found for submodule path in .gitmodules

Open louwers opened this issue 2 years ago • 5 comments

#354 is still a problem for self-hosted runners specifically

I'm using actions/checkout@v3 and getting

Error: fatal: No url found for submodule path 'vendor/mapbox-gl-native-curl' in .gitmodules

With a recently deleted submodule.

louwers avatar May 26 '23 18:05 louwers

Deleting the actions-worker/_work directory seems to have solved the problem, but I don't want to have to keep doing this is we delete more submodules in the future.

louwers avatar May 27 '23 08:05 louwers

Ran into this with an invalid submodule that was accidentally introduced to our repo. It only happens with persist-credentials: false set. https://github.com/GoogleCloudPlatform/magic-modules/actions/runs/11058094944/job/30723349995#step:3:68

melinath avatar Sep 26 '24 22:09 melinath

Deleting the actions-worker/_work directory seems to have solved the problem

Doesn't work for me.

geoff-m avatar Jan 13 '25 18:01 geoff-m

@dscho I wonder if you might help me get git or actions/checkout to handle persist-credentials: false (which trips on git submodule foreach) better?

I've worked around this problem in: https://github.com/check-spelling-sandbox/check-spelling/commit/6bbb7ebc7d30da63705fb5ca0fe7059a62931980

Here's a sample repository with the problem: https://github.com/check-spelling-sandbox/editorconfig-gedit/actions/runs/14555001851/job/40871712077

Here's my action before and after apply my fix

I'm going to try to add a test to at least https://github.com/git/git/blob/master/contrib/subtree/t/t7900-subtree.sh. Offhand, my preference would be for git submodule foreach to not die under these circumstances. As there don't seem to be any other ways for a generic git consumer to deal with this problem short of doing something like what I'm doing (which is very hacky).

@joshmgross before you change persist-credentials, this needs to be fixed.

jsoref avatar Apr 21 '25 18:04 jsoref

@jsoref I lack the time to support actions/checkout; Besides, I am no longer working inside GitHub.

dscho avatar Apr 28 '25 10:04 dscho