git-sync

Serves a local git repository to the workspace's Git Tracker. The workspace asks for git protocol operations (info/refs, git-upload-pack, ...) over a WebSocket, and the CLI executes them locally with git http-backend, then sends the response back. This lets a workspace index a repo that it cannot reach directly.

The command stays connected until the workspace signals it is done.

Syntax

Usage: curiosity-cli git-sync --server <url> --token <token> --path <repo> [options]

curiosity-cli git-sync \
  --server https://my-workspace.example.com/ \
  --token  $CURIOSITY_TOKEN \
  --path   /home/me/repos/atlas

If --path doesn't yet exist as a directory, the CLI creates it. For an empty directory, run git init (or git clone --bare) inside it before re-invoking — the workspace expects an actual git repo on disk.

Options

Option Description
--server Workspace URL. Alias -s. Required.
--token Library Token. Alias -t. Required.
--path Path to a local git repository (created if missing). Alias -p. Required.
--ignore-certificate-errors Disable TLS validation for both REST and WebSocket. Dev only. Alias -i. Default false.
--verbose Log every request/response, including the full JSON payload. Alias -v. Default false.

Requirements

  • The git binary must be on PATH — the CLI launches git http-backend as a child process.
  • The workspace must have a git-tracker configured to talk to a tracker token. Generate one in the workspace under Manage → Tokens → Library with the tracker scopes enabled.

Mutual TLS

If you've set CURIOSITY_CLI_MUTUAL_TLS_CERTIFICATE_PATH (see Common Options), the CLI presents the same client certificate on the WebSocket connection it opens here, not just on REST calls.

Troubleshooting

  • Failed to run command with a generic error — re-run with --verbose to dump the exact request that failed and the git http-backend reply.
  • Repository not found / 404 — make sure the path actually contains a .git/ directory or is a bare repo.
  • Stalls forever — the workspace tracker is expecting a DONE frame from itself when sync is complete. If the workspace process restarts mid-sync, the CLI may sit idle; restart the CLI as well.

Remarks

  • Use git-sync to let a workspace index a local git repository it cannot reach directly; the CLI proxies git operations over a WebSocket.
  • The git binary must be on PATH, and the workspace needs a git-tracker configured with a token that has tracker scopes.
  • The command stays connected until the workspace signals completion — consider store-token when running it as a long-lived service.

See also

© 2026 Curiosity. All rights reserved.