winget-cli icon indicating copy to clipboard operation
winget-cli copied to clipboard

git submodule status: fatal no submodule mapping found

Open gigi81 opened this issue 1 year ago • 3 comments

Brief description of your issue

After checking out the repo, the git submobule status command fails. This prevents the repo to be used as a submodule.

Steps to reproduce

git clone https://github.com/microsoft/winget-cli.git
git submodule status
fatal: no submodule mapping found in .gitmodules for path 'src/cpprestsdk/cpprestsdk/Release/libs/websocketpp'

Expected behavior

"git submodule status" should not return errors after cloning the repo

Actual behavior

"git submodule status" fails after cloning the repo

Environment

Windows

gigi81 avatar Jan 23 '23 20:01 gigi81

It looks like it's been quite some time since anyone touched the .gitmodules file.

https://github.com/microsoft/winget-cli/blob/6683dbe12382c8b5ecd01796085436c19c624bd5/src/cpprestsdk/cpprestsdk/.gitmodules#L4-L7

denelon avatar Jan 23 '23 22:01 denelon

The same happened here: https://github.com/vedantmgoyal2009/winget-releaser/actions/runs/3977537629.

As previously suggested by @itzlevvie (in gitter chat), I've set persist-credentials: false in my workflow. If I set it to true, it works!

As a temporary workaround, you might want to clone with an authenticated URL, like https://<github-personal-access-token>@github.com/microsoft/winget-cli.git, but yes, ideally, it should be fixed in the repo itself.

vedantmgoyal9 avatar Jan 24 '23 11:01 vedantmgoyal9

@vedantmgoyal2009 which repository do you believe is misconfigured?

denelon avatar Jan 24 '23 16:01 denelon