.cargo/configに設定する
defaultだとcargoが~/.ssh/configを参照してくれないので以下を追加
~/.cargo/config
[net]
git-fetch-with-cli = true
Cargo.tomlでの指定
Cargo.toml
[dependencies]
pkg-name = { version = "0.1.0", git = "ssh://git@your-repo-host/git-user-or-group/pkg-name.git", branch = "master" }
key points
gitのフォーマットもcloneする時のURLを使うとエラーになる
-
ssh:
をいれる - host:username になっていたら host/username などにpathを変更する