Skip to main content
repositories:
  <local-path>:
    type: <git|hg|svn|bzr|tar|zip>
    url:  <string>
    version: <string>   # optional

Type

map[string, RepositoryEntry] The map key is the destination path, relative to the workspace (or absolute).

Required

No. Omit repositories: entirely if you don’t need any.

Entry fields

type

FieldTypeRequiredAllowed values
typestringyesgit, hg, svn, bzr, tar, zip
TypeBackend
gitPure-Go (no system git binary required).
hgSystem hg binary.
svnSystem svn binary.
bzrSystem bzr binary.
tarHTTPS download + in-place extraction.
zipHTTPS download + in-place extraction.

url

FieldTypeRequired
urlstringyes
The remote URL or local path. Format depends on the type:
  • git: https://..., git@host:owner/repo.git, file://..., or a local path.
  • hg, svn, bzr: any URL the matching binary accepts.
  • tar, zip: any HTTPS URL returning the archive.

version

FieldTypeRequired
versionstringno
Type-specific:
Typeversion is
gitbranch, tag, or commit SHA. Defaults to the remote’s default branch.
hgrevision identifier (changeset, tag, branch).
svnrevision number, as a quoted string ("1234").
bzrrevision identifier.
tar, zipstrip-prefix string, the leading directory removed during extraction.

Example

repositories:
  src/gaal:
    type: git
    url: https://github.com/getgaal/gaal.git
    version: main

  src/legacy:
    type: svn
    url: https://svn.example.com/repos/legacy/trunk
    version: "1234"

  vendor/sdk:
    type: tar
    url: https://example.com/sdk-v3.tar.gz
    version: sdk-v3

Behaviour

  • A first sync clones (or extracts) into the destination path.
  • Subsequent syncs fast-forward or re-extract if the URL or version changed.
  • Removing an entry from gaal.yaml does not delete the directory. --prune ignores repositories.

Concepts: Repositories

Configure repositories

Pinning versions