mirror of
https://github.com/webfactory/ssh-agent.git
synced 2024-11-21 08:40:49 +00:00
Add note about using cargo with private dependencies (#64)
* Add note about using cargo with private dependencies * Update doc to mention Windows only * Add alternative workaround * Create extra main section for tips and information regarding different languages/tools Co-authored-by: Matthias Pigulla <mp@webfactory.de>
This commit is contained in:
parent
6b2f2c5354
commit
5f95203cea
1 changed files with 32 additions and 0 deletions
32
README.md
32
README.md
|
@ -90,6 +90,38 @@ If the private key is not in the `PEM` format, you will see an `Error loading ke
|
|||
|
||||
Use `ssh-keygen -p -f path/to/your/key -m pem` to convert your key file to `PEM`, but be sure to make a backup of the file first 😉.
|
||||
|
||||
## Additional Information for Particular Tools or Platforms
|
||||
|
||||
If you know that your favorite tool or platform of choice requires extra tweaks or has some caveats when running with SSH, feel free to open a PR to amend this section here.
|
||||
|
||||
### Cargo's (Rust) Private Dependencies on Windows
|
||||
|
||||
If you are using private repositories in your dependencies like this:
|
||||
|
||||
```
|
||||
stuff = { git = "ssh://git@github.com/myorg/stuff.git", branch = "main" }
|
||||
```
|
||||
|
||||
... you will need to change a configuration in the workflow for Windows machines in order to make cargo able to clone private repositories.
|
||||
|
||||
There are 2 ways you can achieve this:
|
||||
|
||||
1. Add this step once in your job **before** any cargo command:
|
||||
|
||||
```
|
||||
- name: Update cargo config to use Git CLI
|
||||
run: Set-Content -Path $env:USERPROFILE\.cargo\config.toml "[net]`ngit-fetch-with-cli = true"
|
||||
```
|
||||
|
||||
This will configure Cargo to use the Git CLI as explained in the [Cargo's documentation](https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli).
|
||||
|
||||
2. Alternatively you can set it to the environment variables for the entire workflow:
|
||||
|
||||
```
|
||||
env:
|
||||
CARGO_NET_GIT_FETCH_WITH_CLI: true
|
||||
```
|
||||
|
||||
## What this Action *cannot* do for you
|
||||
|
||||
The following items are not issues, but beyond what this Action is supposed to do.
|
||||
|
|
Loading…
Reference in a new issue