Ionic Pro with git submodule

Hi all,

The Ionic team indicated that git submodules are now supported in Ionic Pro. However, I could not find any documentation to set this up. I host my git repos on BitBucket and get the following error:

Submodule 'src/common' registered for path 'src/common'
Cloning into 'src/common'...
Host key verification failed.
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

How can I setup the ssh keys so that Ionic Pro can access this submodule?

1 Like

I have the exact same issue, did you ever figure out how to get submodules to connect?

@squadle From Ionic support I received the following reply:

Unfortunately we don’t yet offer support for private repos. A public version of your bitbucket repo should work but not if any authentication is required.

I worked around this by using a git subtree instead of a submodule.

1 Like

Are there plans for allowing private git submodules in Ionic deploy? What if we embedded the username/password in the submodule reference like Heroku does? Is there a planned date for this?

Hey, any solution yet? I have the same problem, my private main repo with a git submodule (in my private Gitlab). I think it could be great if we can have the public key injected in the build runner in order to add it in Gitlab or private github as deployement key.

I also switched from using a sub-module and went with a sub-tree and it works now.

Another workaround for now is to copy submodule directory and commit it as part of the Ionic Pro repository. I did it using a bash script that automatically does it, pushes code to ionic pro and then reverts everything as it was before.
I know it’s ugly, but I didn’t want to change organization of my project because of Ionic Pro limitations.
See more here: Ionic Pro - Package Build fails due to git submodule

Good news! Seems like private sub-modules are working now!

I set up integration with my main repository on Bitbucket Cloud ( and now private sub-module is successfully fetched during the build