(This is what arose mainly for me when using github, so I am not against too much if any solution is specific to github. But the problem is not specific to github, and any solution, t have to be.)
You can always clone public repositioning of github using https.
git clone https://github.com/my-user-name/SDL-mirror/
If you have an SSH key that github knows about, you can also clone it using SSH.
git clone git@github.com:my-user-name/SDL-mirror.git
(I think these options apply when using a bitpack.)
You have these two options when adding a submodule too.
When you add a submodule, you often add an SSH version, so you can commit directly from the submodule after testing your changes in place.
But what about people trying to clone your repo? They may not have SSH access to github. This way they will clone your repo using the https url ... and then peel off when git tries to clone the submodules using SSH urls.
It can also be a problem if you use the git repository for system support.
Ideally, I would like git to retrieve the SSH URL if possible, and the https URL if not. This should make everything work out of the box for everyone. Is there a way I can do this?