Git
The whole build and deploy process at statichost.eu starts with cloning the git
repository of your site. Basically any URL that git clone
understands will
work with statichost.eu - without restrictions and for all users. However, in
general, it is advisable to add public repositories with their HTTPS URL and
private repositories with their SSH URL.
Public repositories are better added using an HTTPS URL, because HTTPS does not require authentication. You are free to add public repositories with SSH, but note that in most cases this will require you to add the site’s public key to the repository or server.
Private repositories need to be added using an SSH URL, because that is the only way to authenticate against the git server*. When adding your site, you will receive the public key for the certificate used for authentication. This certificate needs to be added to the repository or server and is unique to your site.
Adding the SSH public key to the repository or server is in most cases achieved by adding it as a “deploy key” for the repository. How this is done in practice will vary by provider, but see below for some examples. It is of course also possible to add the public key as an authorized key for a specific user, should this be required - for instance if your git repository is accessed directly via SSH as a directory.
*) We are not planning to implement password-based authentication (which could be used to access private repositories via HTTPS) because of the technical superiority of certificate-based authentication. However, contact support if you cannot use certificate-based authentication over SSH for your private repository, and we’ll see what we can do.
Supported providers and features
On statichost.eu, you can connect any git repository on any git provider you
want. The repository URL needs to be reachable from our build servers, of
course, and authentication needs to be in order. But in general, any URL that
can be used with git clone
can be used with statichost.eu.
Git submodules are supported, and we will recursively clone submodules as part of the build and deployment process. Private submodules do not work automatically, however. Please contact support if you need support for private submodules. Public submodules (accessed via HTTPS) should work without issues.
Git LFS (large file storage) is supported, but currently in beta. Contact support in order to be enrolled in the beta and receive Git LFS support.
Private repositories
We create SSH key pairs for every site. If your repository is private, please add your site using an SSH URL and add the public key as a “deploy key” (or similar) to your repository. The public key is visible on the site overview in the dashboard.
How this is configured will vary by provider, but below are some examles (we will of course help you set this up on other providers as well).
GitHub
- Navigate to the repository of your site.
- Go to the
Settings
tab. - Click on the
Deploy keys
tab. - Click on the
Add deploy key
button. - Choose a name, such as “statichost publish” and paste in the provided key under
Key
. - Press
Add key
.