checkout icon indicating copy to clipboard operation
checkout copied to clipboard

[bug] Submodule with missing link in .gitmodules fails

Open dsayling opened this issue 3 years ago • 3 comments

So, a colleague has a repository with a submodule that's been removed incorrectly. The link still persists in the tree somehow, but the .gitmodules file has been removed. The checkout step is defined to not checkout the submodules, but it still fails in setting up the auth:

Run actions/checkout@v2
  with:
    ref: <ref>
    fetch-depth: 0
    repository: <repo>
    token: ***
    ssh-strict: true
    persist-credentials: true
    clean: true
    lfs: false
    submodules: false
    set-safe-directory: true
    
  /usr/bin/git config --local --name-only --get-regexp core\.sshCommand
  /usr/bin/git 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 'src/submodule' in .gitmodules
  Error: The process '/usr/bin/git' failed with exit code 128

Why is the submodule command even being run? Does it have to?

dsayling avatar May 02 '22 15:05 dsayling

same issue happened to me too

sangshuduo avatar Jul 26 '22 09:07 sangshuduo

This is technically a duplicate of #354

jsoref avatar Aug 22 '22 19:08 jsoref

This is technically a duplicate of #354

It does appear to be related, but I don't know if they're trying to explicitly disable submodules or not. It seems to me that if 'false', it shouldn't try setting up the submodules on first clone. 🤷

dsayling avatar Aug 22 '22 20:08 dsayling