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.
Usage
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
| Flag | Alias | Required | Default | Description |
|---|---|---|---|---|
--server |
-s |
yes | - | Workspace URL. |
--token |
-t |
yes | - | Library Token. |
--path |
-p |
yes | - | Path to a local git repository (created if missing). |
--ignore-certificate-errors |
-i |
no | false |
Disable TLS validation for both REST and WebSocket. Dev only. |
--verbose |
-v |
no | false |
Log every request/response, including the full JSON payload. |
Requirements
- The
gitbinary must be onPATH— the CLI launchesgit http-backendas 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 commandwith a generic error — re-run with--verboseto dump the exact request that failed and thegit http-backendreply.- 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
DONEframe from itself when sync is complete. If the workspace process restarts mid-sync, the CLI may sit idle; restart the CLI as well.
See also
- Data Connector — for ingesting non-git sources.
store-token— useful when runninggit-syncas a long-lived service.