Site Creation with Remote Repositories

Crafter Studio supports site creation with remote repositories and provides two options:

  • Create site based on remote Git repository

  • Create site based on a blueprint then add a remote Git repository

To start creating a site with remote repository, from the Sites screen, click on the Create Site button. A Create Site dialog will be launched. For both options, there will be a screen where the Remote Git Repository Name and Remote Git Repository URL needs to be filled out and the rest is optional and only needs to be filled out if required by the remote git repository being used.

Let’s take a look at the fields where the remote repository details needs to be filled in:

System Administrator - Remote Repository Details

  1. In the Git Repo URL field you must provide the link to the Git repository you would like to use

  2. In the Authentication field you must select the authentication method to be used to access the Git repository in the previous field.

    Crafter CMS supports the following authentication types to use to access remote repository:

    • Authentication not required (Public URL) - no credentials needed to access remote repository

    • Username & Password - for this method, you will be asked for a Remote Git Repository Username and a Remote Git Repository Password. Supply your username and password

    • Token - for this method, you will be asked for a Remote Git Repository Username (if required) and a Remote Git Repository Token. This method is usually used when two-factor authentication is configured on the remote repository to be accessed. Supply your username if required and token.

    • Private Key - for this method, you will be asked for a Remote Git Repository Private Key. This method is a key-based authentication. Supply your private key.

  3. In the Git Branch field, you can supply a branch name, but can be left blank, which in turn would default to the master branch.

  4. In the Git Remote Name field you want to provide a repository name that makes sense. It’s common to use “origin” or “upstream.”

Create site based on a blueprint then add a remote bare Git repository

To create a site based on a blueprint then add a remote bare git repository, click on Create Site from Sites, then select the blueprint you would like to use

Create Site Dialog in Crafter Studio, select a blueprint

The next step is to fill in the Site ID and Site Name, then click on the Review button, then finally click on the Create Site button to create your site. Your site should be created in a short while.

Create Site Dialog in Crafter Studio, fill in Site ID

Once your site is created, the next step is to add a remote repository to your newly created site. Open the Sidebar then click on Site Config -> Remote Repositories, then click on the New Repository on the top right. This will open up a dialog where we can fill in all the information for our remote repository as described above. Click on the Create button after filling in the required information.

Create Repository dialog to fill in information of remote repository being added to the site

Your site should now have a remote repository listed in the Remotes screen

Remotes screen displaying newly added remote repository to site

Remember that the remote repository needs to be a bare git repository, since we are pushing our newly created site to the remote repository. To push our newly create site to the remote repository, click on the Push button (button with the up arrow) next to the remote repository

Create site based on a remote Git repository

Creating a site based on a remote Git repository is basically exporting a site from one Studio and importing it into another one.

To create a site based on remote Git repository, after clicking on Create Site, Click on Remote Git Repository in the Private Blueprints tab create site screen

Developer How Tos - Setting up to work locally against the upstream

Click on the Site ID field where you’ll need to give your site an ID. Scroll down to see where you can fill in all the information for the remote repository we are importing. The Git Repo URL is the import site’s sandbox repository git url (the site you want to bring over to your Studio). Below are sample urls for the site being imported:

Here is a sample Git url from GitHub: https://github.com/username/hello-test.git Here is a sample Git url using ssh: ssh://[user@]host.xz[:port]/path/to/repo/ or alternatively for ssh: [user@]host.xz:path/to/repo/

Developer How Tos - Setting up to work locally against the upstream

Click on the Review button, then finally, the Create Site button.

Developer How Tos - Setting up to work locally against the upstream review entries

After a short while, your site will be imported.

In case you want to publish the entire site, follow these optional steps:

  1. In the site you just imported, click on Site Tools, then click on Publishing

    System Administrator - Bulk Publishing"
  2. In the Publishing screen, click on the Bulk Publish tab, and in the Path to Publish field, just enter /, then click on the Publish button to publish the whole site.

    System Administrator - Bulk Publish the whole site filled in"