Usage: git-sync [FLAGS...]
FLAGS:
--add-user add a record to /etc/passwd for the current UID/GID (needed to use SSH with an arbitrary UID)
--askpass-url string a URL to query for git credentials (username=<value> and password=<value>)
--cookie-file use a git cookiefile (/etc/git-secret/cookie_file) for authentication
--credential credentialSlice one or more credentials (see --man for details) available for authentication (default [])
--depth int create a shallow clone with history truncated to the specified number of commits (default 1)
--error-file string the path (absolute or relative to --root) to an optional file into which errors will be written (defaults to disabled)
--exechook-backoff duration the time to wait before retrying a failed exechook (default 3s)
--exechook-command string an optional command to be run when syncs complete (must be idempotent)
--exechook-timeout duration the timeout for the exechook (default 30s)
--filter string use partial clone with the specified filter (e.g. 'blob:none', 'tree:0')
--git string the git command to run (subject to PATH search, mostly for testing) (default "git")
--git-config string additional git config options in 'section.var1:val1,"section.sub.var2":"val2"' format
--git-gc string git garbage collection behavior: one of 'auto', 'always', 'aggressive', or 'off' (default "always")
--github-app-application-id int the GitHub app application ID to use for GitHub app auth
--github-app-client-id string the GitHub app client ID to use for GitHub app auth
--github-app-installation-id int the GitHub app installation ID to use for GitHub app auth
--github-app-private-key-file string the file from which the private key for GitHub app auth will be sourced
--github-base-url string the GitHub base URL to use when making requests to GitHub when using GitHub app auth (default "https://api.github.com/")
--group-write ensure that all data (repo, worktrees, etc.) is group writable
-h, --help print help text and exit
--http-bind string the bind address (including port) for git-sync's HTTP endpoint
--http-metrics enable metrics on git-sync's HTTP endpoint
--http-pprof enable the pprof debug endpoints on git-sync's HTTP endpoint
--init-max-failures int the number of consecutive failures allowed before aborting during the initial sync phase; a negative value retries forever; if unset, --max-failures applies instead
--init-period duration how long to wait between sync attempts until the first success, must be >= 10ms if set; if unset, --period is used
--link string the path (absolute or relative to --root) at which to create a symlink to the directory holding the checked-out files (defaults to the leaf dir of --repo)
--man print the full manual and exit
--max-failures int the number of consecutive failures allowed before aborting (-1 will retry forever
--one-time exit after the first sync
--password-file string the file from which the password or personal access token for git auth will be sourced
--period duration how long to wait between syncs, must be >= 10ms; --wait overrides this (default 10s)
--ref string the git revision (branch, tag, or hash) to sync (default "HEAD")
--repo string the git repository to sync (required)
--root string the root directory for git-sync operations (required)
--sparse-checkout-file string the path to a sparse-checkout file
--ssh-key-file stringArray the SSH key(s) to use (default [/etc/git-secret/ssh])
--ssh-known-hosts enable SSH known_hosts verification (default true)
--ssh-known-hosts-file string the known_hosts file to use (default "/etc/git-secret/known_hosts")
--stale-worktree-timeout duration how long to retain non-current worktrees
--submodules string git submodule behavior: one of 'recursive', 'shallow', or 'off' (default "recursive")
--sync-on-signal string sync on receipt of the specified signal (e.g. SIGHUP)
--sync-timeout duration the total time allowed for one complete sync, must be >= 10ms; --timeout overrides this (default 2m0s)
--touch-file string the path (absolute or relative to --root) to an optional file which will be touched whenever a sync completes (defaults to disabled)
--username string the username to use for git auth
-v, --verbose int logs at this V level and lower will be printed
--version print the version and exit
--webhook-backoff duration the time to wait before retrying a failed webhook (default 3s)
--webhook-method string the HTTP method for the webhook (default "POST")
--webhook-success-status int the HTTP status code indicating a successful webhook (0 disables success checks (default 200)
--webhook-timeout duration the timeout for the webhook (default 1s)
--webhook-url string a URL for optional webhook notifications when syncs complete (must be idempotent)
ENVIRONMENT VARIABLES:
GITSYNC_GITHUB_APP_PRIVATE_KEY string the private key to use for GitHub app auth
GITSYNC_PASSWORD string the password or personal access token to use for git auth
Options (51)
| Option | Description | Source |
|---|---|---|
--add-user | add a record to /etc/passwd for the current UID/GID (needed to use SSH with an arbitrary UID) | help |
--askpass-url string | a URL to query for git credentials (username=<value> and password=<value>) | help |
--cookie-file | use a git cookiefile (/etc/git-secret/cookie_file) for authentication | help |
--credential credentialSlice | one or more credentials (see --man for details) available for authentication (default []) | help |
--depth int | create a shallow clone with history truncated to the specified number of commits (default 1) | help |
--error-file string | the path (absolute or relative to --root) to an optional file into which errors will be written (defaults to disabled) | help |
--exechook-backoff duration | the time to wait before retrying a failed exechook (default 3s) | help |
--exechook-command string | an optional command to be run when syncs complete (must be idempotent) | help |
--exechook-timeout duration | the timeout for the exechook (default 30s) | help |
--filter string | use partial clone with the specified filter (e.g. 'blob:none', 'tree:0') | help |
--git string | the git command to run (subject to PATH search, mostly for testing) (default "git") | help |
--git-config string | additional git config options in 'section.var1:val1,"section.sub.var2":"val2"' format | help |
--git-gc string | git garbage collection behavior: one of 'auto', 'always', 'aggressive', or 'off' (default "always") | help |
--github-app-application-id int | the GitHub app application ID to use for GitHub app auth | help |
--github-app-client-id string | the GitHub app client ID to use for GitHub app auth | help |
--github-app-installation-id int | the GitHub app installation ID to use for GitHub app auth | help |
--github-app-private-key-file string | the file from which the private key for GitHub app auth will be sourced | help |
--github-base-url string | the GitHub base URL to use when making requests to GitHub when using GitHub app auth (default "https://api.github.com/") | help |
--group-write | ensure that all data (repo, worktrees, etc.) is group writable | help |
-h, --help | print help text and exit | help |
--http-bind string | the bind address (including port) for git-sync's HTTP endpoint | help |
--http-metrics | enable metrics on git-sync's HTTP endpoint | help |
--http-pprof | enable the pprof debug endpoints on git-sync's HTTP endpoint | help |
--init-max-failures int | the number of consecutive failures allowed before aborting during the initial sync phase; | help |
--init-period duration | how long to wait between sync attempts until the first success, must be >= 10ms if set; | help |
--link string | the path (absolute or relative to --root) at which to create a symlink to the directory holding the checked-out files (defaults to the leaf dir of --repo) | help |
--man | print the full manual and exit | help |
--max-failures int | the number of consecutive failures allowed before aborting (-1 will retry forever | help |
--one-time | exit after the first sync | help |
--password-file string | the file from which the password or personal access token for git auth will be sourced | help |
--period duration | how long to wait between syncs, must be >= 10ms; | help |
--ref string | the git revision (branch, tag, or hash) to sync (default "HEAD") | help |
--repo string | the git repository to sync (required) | help |
--root string | the root directory for git-sync operations (required) | help |
--sparse-checkout-file string | the path to a sparse-checkout file | help |
--ssh-key-file stringArray | the SSH key(s) to use (default [/etc/git-secret/ssh]) | help |
--ssh-known-hosts | enable SSH known_hosts verification (default true) | help |
--ssh-known-hosts-file string | the known_hosts file to use (default "/etc/git-secret/known_hosts") | help |
--stale-worktree-timeout duration | how long to retain non-current worktrees | help |
--submodules string | git submodule behavior: one of 'recursive', 'shallow', or 'off' (default "recursive") | help |
--sync-on-signal string | sync on receipt of the specified signal (e.g. SIGHUP) | help |
--sync-timeout duration | the total time allowed for one complete sync, must be >= 10ms; | help |
--touch-file string | the path (absolute or relative to --root) to an optional file which will be touched whenever a sync completes (defaults to disabled) | help |
--username string | the username to use for git auth | help |
-v, --verbose int | logs at this V level and lower will be printed | help |
--version | print the version and exit | help |
--webhook-backoff duration | the time to wait before retrying a failed webhook (default 3s) | help |
--webhook-method string | the HTTP method for the webhook (default "POST") | help |
--webhook-success-status int | the HTTP status code indicating a successful webhook (0 disables success checks (default 200) | help |
--webhook-timeout duration | the timeout for the webhook (default 1s) | help |
--webhook-url string | a URL for optional webhook notifications when syncs complete (must be idempotent) | help |