If a submodule needs to reference a specific deploy key (key1), you need to change the submodule URL using git submodule set-url -- /path/to/submodule key1:northskool/frontend.git.
You may have to run: git submodule init.
This will ultimately set the URL of the specified submodule to <newurl>. Then, it will automatically synchronize the submodule’s new remote URL configuration.
With key1 a Host entry in your ~/.ssh/config, as commented:
Host key1
Hostname github.com
User git
IdentityFile ~/.ssh/key1
In Travis, this would be defined in the before_script step in your .travis.yml.
We here at Travis have historically urged users to use user keys. You can add SSH keys to user accounts on GitHub. Most users have probably already done this to be able to clone the repositories locally.
You can add these keys through the Travis CLI:
travis sshkey --upload ~/.ssh/id_rsa -r myorg/main
Key description: Key to clone myorg/lib1 and myorg/key1
updating ssh key for myorg/main with key from ~/.ssh/id_rsa
Current SSH key: Key to clone myorg/lib1 and myorg/key2