..
Cargo.toml依赖私有库方式
- 创建文件
~/.ssh/config
Host * IgnoreUnknown UseKeychain UseKeychain yes AddKeysToAgent yes IdentityFile ~/.ssh/id_rsa
- 指定私钥
ssh-add -k ~/.ssh/id_rsa
- 如果上步提示:
Could not open a connection to your authentication agent.
,执行命令eval `ssh-agent -s` ssh-add -k ~/.ssh/id_rsa
- Cargo.toml 添加私有库依赖
[dependencies] demo = { git = "ssh://git@xxx.com/xx/demo.git", tag = "v0.0.1" }
Done.