dstack init¶
If you’re using private Git repos in your runs via repos
,
dstack
will automatically try to use your default Git credentials (from
~/.ssh/config
or ~/.config/gh/hosts.yml
).
To provide custom Git credentials, run dstack init
.
$ dstack init --help
Usage: dstack init [-h] [--project PROJECT] [-P REPO] [-t OAUTH_TOKEN]
[--git-identity SSH_PRIVATE_KEY]
Options:
-h, --help Show this help message and exit
--project PROJECT The name of the project
-P, --repo REPO The repo to initialize. Can be a local path or a Git
repo URL. Defaults to the current working directory.
-t, --token OAUTH_TOKEN
An authentication token to access a private Git repo
--git-identity SSH_PRIVATE_KEY
The private SSH key path to access a private Git repo
You can set credentials with --git-identity
(private SSH key) or --token
(OAuth token).
Run dstack init
in the repo’s directory, or pass the repo path or URL with --repo
(or -P
).