statichost.eu logo
Documentation

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 can be used without any 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 are better added using an SSH URL, because of the technical superiority of the certificate-based authentication used by SSH. Password-based authentication over HTTPS is also supported, but should only be used in cases where SSH is not feasible or possible.

When using SSH to connect your repository, you will receive a 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.

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 fully supported.

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

  1. Navigate to the repository of your site.
  2. Go to the Settings tab.
  3. Click Deploy keys in the menu.
  4. Click on the Add deploy key button.
  5. Choose a name, such as “statichost deployment” and paste in the provided key under Key.
  6. Press Add key.

Bitbucket

  1. Navigate to your repository on bitbucket.org.
  2. Go to Repository settings.
  3. Under Security, select Access keys.
  4. Click the Add key button.
  5. Enter a descriptive name (e.g., “statichost deployment”) under Label.
  6. Paste the provided key into the Key field.
  7. Press Add key.

Azure DevOps

Azure DevOps does not have a “deploy key” concept like many other providers. It is possible to add SSH keys to your user account, and deploy keys can be added here*. Please note, however, that these keys will have full read/write access to all repositories you have access to. Thus, the recommended way to connect to private Azure DevOps is via Personal Access Tokens. Tokens can be limited in scope and can have expiration times.

In order to use a Personal Access Token (PAT) for authentication, you need to select HTTPS as the connection scheme in statichost.eu and add HTTPS authentication details. The username is your Azure DevOps username and the password is the PAT.

In order to create a new Personal Access Token, you can use either one of these methods:

*) Azure DevOps only supports RSA keys, while statichost.eu uses ed25519 keys by default. If you need to create an RSA key for your site, please contact support.

Monorepos

Monorepos are fully supported on statichost.eu. In the dashboard, you can specify the “working directory” within your repository that should be used for building your site. Note that the statichost.yml config file is loaded from this directory as well.