Cloning of a new (public github) submodule fails

Hello,

I’ve been using CircleCI for a while, but only recently have I had the need to change my project’s submodules. However, cloning the submodules fails with ERROR: Repository not found. All three submodules are publicly available github repositories.
I do have “an SSH user key” added to my repo’s CircleCI configuration, as well as the deploy key.

What’s strange is that I actually added 4 submodules, and only one of the four submodules can be cloned. That one is owned by me. The other three submodules are also submodules of another submodule, but, for whatever reason, what doesn’t work as a submodule for me, works as a submodule of my submodule.

CircleCI build encountering the error

What’s frustrating is that this isn’t the only case where I need to change submodules.

Turns out CircleCI doesn’t like trailing slashes in .gitmodules.

URL that didn’t work: https://github.com/slezica/python-frozendict/
URL that did work: https://github.com/slezica/python-frozendict

For the record, the reason is that CIrcleCI adds the following .gitconfig:

[url "ssh://git@github.com"]
        insteadOf = https://github.com

Cloning via ssh does not work with a trailing / in the address.

1 Like

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.