---
title: 'repo clone'
weight: 20
generated: true
description: 'Clone a remote repository'
---

<!-- Generated by scripts/gen-cli-docs.sh from the libfossil --help output. Do not edit; change the help text in cli/ and run make docs-gen. -->

```text
Usage: libfossil repo clone [<url> [<path>]] [flags]

Clone a remote repository

Arguments:
  [<url>]     Remote Fossil server URL
  [<path>]    Local path for new repository file

Flags:
  -h, --help                     Show context-sensitive help.
  -R, --repo=STRING              Path to repository file
  -v, --verbose                  Verbose output

  -u, --user=STRING              Username for clone auth
  -p, --pass=STRING              Password for clone auth
      --invite=STRING            Invite token (from fossil invite)
      --timeout=10m              Abort the clone if it runs longer than this;
                                 0 disables the deadline
      --horizon=STRING           Clone a horizon store: elide blobs below this
                                 check-in, given as tip, a branch or tag,
                                 or its full 40 or 64 digit hash; the origin
                                 resolves a name, or the clone does over what
                                 an origin that cannot sends it; what each rule
                                 would hold needs a local repository ('repo cone
                                 cost') or a peer that exposes it out of band,
                                 as the origin's horizon-served URL may
      --depth=INT                With --horizon, step the check-in back this
                                 many check-ins along primary parents, stopping
                                 at a root
      --leaves                   With --horizon, also hold every open leaf's
                                 ancestry back to the check-in, for merging
                                 across live branches offline; costly: on a
                                 repository with old unmerged branches that is
                                 nearly the whole history
      --structural               With --horizon, also elide the manifests below
                                 the check-in, deriving their branch and tag
                                 state from the origin's seed
      --cone=CONE,...            Clone a sparse store: fetch only this path's
                                 subtree (repeatable)
      --cone-not=CONE-NOT,...    Carve this path out of a --cone (repeatable)
      --seed-key=STRING          The origin's public key, an SSH public key line
                                 or an OpenPGP fingerprint: with --structural, a
                                 horizon seed not signed by it is discarded and
                                 the clone falls back to the content horizon;
                                 kept as the horizon-seed-key setting
```
