New ssh key need for every repo needing submodules

Not for a specific provider, but I have to request a new ssh key each time I want to build a repo with submodules using ssh.

I know one solution is to change the submodules to use https, but if I do that, I cannot myself use ssh to maintain the submodules.

I would love to easily request an ssh key to be attached to a Netlify site. Perhaps a button or something in the build section of my site’s deploy settings, e.g. https://app.netlify.com/sites/fancily-named-site/settings/deploys

hmm interesting @thunderrabbit! I think this warrants a separate request. I’ll move you to a new thread.

Heya @thunderrabbit we can only use one key per site, so it’s a bit more complicated than “Add a key to a site”. If you use GitHub and our GitHub app, it’s least complicated, as you can add a key without affecting the setup. For GitLab and Bitbucket, you need to generate a new key and then apply it to the main site and the submodule site somehow - and since most git providers do not like “sharing” keys, you actually have to assign the Deploy Key to a dummy user instead, who has access to both sites.

Nonetheless, I can talk you through creating a key via the API if that is of interest, so you can self serve (in either case - though in GitHub it’ll again be simpler since you just assign the key rather than having to remove old key, set key on dummy user)

1 Like

Hello Chris!

I don’t know if/how I missed your reply. It seems related to my current new issue that I cannot fetch a branch from Github[1].

Are you still available to talk me through adding the keys? I can move the submodules to Github if that will make things easier.

  • Rob

[1] Error fetching branch from github (but it used to work)

Hi, @thunderrabbit, I replied in the other topic about this. I sent you the updated public key used for submodule checkout there (which I do think is the reason for the most recent failed deploy of that site).

Please reply there is there are other question or if the new key doesn’t resolve the issue.

1 Like