Skip to main content

Linking Git Repos

Shakudo jobs and services pull their starting code, data and configuration from a Git repository by default. If not specified explicitly, a default repository is used depending on your Shakudo installation settings.

When specifying a pipeline YAML for a job or service, the path is relative to the repository specified. If the file cannot be found, the job or service will fail.

You must be an admin for your Shakudo environment to link Git repositories.

Adding a Git Repository

First, navigate to the Git Repositories panel on the black sidebar. You may need to scroll down.

Next, click the orange "Link Git Repository" button on the top right, above the table.

You will need to fill in the form below.

Add Git repository

  • The Name is an arbitrary string to display the entry in the list of Git repositories listed on the page.
  • The Git repository SSH URL is the URL of the Git repository to link to. HTTPS is not supported, only SSH. The link format looks like user@server.com:repo.git. For example, Shakudo's public examples repository's SSH URL is git@github.com:devsentient/examples.git. In some cases, like with GitLab, you will need to add "ssh://" in front of your URL.
  • The Default Branch is the branch to use when none is specified in a job or service. This can be the repository's actual default branch (for example, main), or any other branch to be considered the default on Shakudo. This branch will be synced in Shakudo. When you create jobs, you will have an opportunity to choose another branch for a specific job.
  • In most cases, you should leave the "Use default SSH key" unchecked, unless you have registered the SSH key during deployment to your own personal account (not recommended).

The Git repository that was added through the steps above will be displayed in the table on the Git Repositories page.

New Git repository

You may notice that the status for the branch we added says "remote not found". As suggested in the tooltip when hovering over the status icon, the problem is that we haven't yet added Shakudo's key to our repository. To do this, copy the SSH key by selecting the key icon on the left side of the table entry. If the popup is blank, wait up to 30 seconds before pressing the key icon again.

Git repository actions

Add it as a deploy key for the repo, or as a personal key if needed. Exact procedure depends on your Git developer platform (e.g. GitLab, Bitbucket, GitHub, Azure DevOps, etc.).

For example, on GitHub, you will need to add the displayed SSH key through the "Deploy Keys" section.

GitHub key register

Unlinking a Repository

To unlink a Git repository, simply click the "x" button in the actions menu next to the branch from a repository that you wish to unlink.