Starting today, you can flip a new switch when creating a new git site or in your existing git site’s settings that will generate a unique git deploy key for that site. For existing git sites, this switch will be off and your server’s git deploy key will be shown. This is the git deploy key you previously added to your GitHub/GitLab/BitBucket/etc account when you set up the site and will continue to work as it has previously. You just now have the option to generate a unique git deploy key for a site and use that instead of the server’s deploy key.
The server’s git deploy key is convenient if you have a GitHub/GitLab/BitBucket/etc account with lots of site repositories and don’t want to copy a unique git deploy key over to each site repository at your provider. You only need to install the server’s git deploy key at the account level of your GitHub/GitLab/BitBucket/etc account to grant SpinupWP access to all the repositories in that account.
But what if you don’t want to give SpinupWP access to all the repositories in your GitHub/GitLab/BitBucket/etc account? You might think that you could just install the server’s git deploy key in each site repository at your provider, but you can’t. GitHub and other providers do not allow the same git deploy key to be installed on multiple repositories. So you can install the server’s git deploy key on one site repository, but not a second.
Similarly, you cannot install a server’s git deploy key on multiple GitHub accounts. That is, if you wanted to set up two git sites on the same server but whose repositories are in two different GitHub accounts, you could not do it. GitHub won’t allow you to add the server’s git deploy key to the second account.
This is why we need a unique deploy key for each site. You can install each site’s unique git deploy key into its respective repository and grant SpinupWP access only to that repository. And if you move the site to another server in the future, the git deploy key goes with it and continues to work, which is not the case when using the server’s git deploy key. This is why we recommend using a unique git deploy key for each site unless you’re in the situation described above and really want that convenience.
Learn more in our Git Deploy Keys doc.