Travis CI is not updating git submodule

I have already created ssh-keygen and added as Deploy key in github, but still its giving permission denied

Submodule 'frontend' ( registered for path 'frontend'
fatal: clone of '' into submodule path 
Failed to clone 'frontend'. Retry scheduled

The command "eval git submodule update --init --recursive " failed. Retrying, 2 of 3.

  submodules: true
  quiet: true
  depth: false

my gitmodules file


[submodule "frontend"]
    path = frontend
    url =

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
  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
1 Like