Skip to content

Add note about using cargo with private dependencies#64

Merged
mpdude merged 4 commits into
webfactory:masterfrom
cecton:doc-for-use-with-cargo
Mar 4, 2021
Merged

Add note about using cargo with private dependencies#64
mpdude merged 4 commits into
webfactory:masterfrom
cecton:doc-for-use-with-cargo

Conversation

@cecton

@cecton cecton commented Mar 4, 2021

Copy link
Copy Markdown
Contributor

Related to #62

@cecton

cecton commented Mar 4, 2021

Copy link
Copy Markdown
Contributor Author

@mpdude feel free to edit the PR directly, I'm not an native English speaker

@mpdude

mpdude commented Mar 4, 2021

Copy link
Copy Markdown
Member

@cecton Thanks for this! By the way, I am also not a native English speaker.

Can you tell me if this is just relevant for Windows (since given in the context of #62), or does it apply to all platforms?

@cecton

cecton commented Mar 4, 2021

Copy link
Copy Markdown
Contributor Author

Geez yes it's only relevant for Windows!! Thanks I will fix it

@mpdude

mpdude commented Mar 4, 2021

Copy link
Copy Markdown
Member

From reading https://doc.rust-lang.org/cargo/appendix/git-authentication.html my guess would be it's not a platform-specific issue, but required only when using deploy keys (since those require extra config/mapping from ~/.ssh/config, which the builtin Git client in Cargo does not support).

So, is that setting also necessary when you use SSH keys for private repos, but don't need to map keys <-> repos?

@cecton

cecton commented Mar 4, 2021

Copy link
Copy Markdown
Contributor Author

From reading https://doc.rust-lang.org/cargo/appendix/git-authentication.html my guess would be it's not a platform-specific issue, but required only when using deploy keys (since those require extra config/mapping from ~/.ssh/config, which the builtin Git client in Cargo does not support).

Confirm?

No, I know it's confusing...

But it is platform specific. Cargo works fine with ssh-agent on not-Windows machine.

@mpdude

mpdude commented Mar 4, 2021

Copy link
Copy Markdown
Member

Never having used Cargo or Rust, so maybe dumb question:

Wouldn't setting CARGO_NET_GIT_FETCH_WITH_CLI=1 in the env section of GHA workflows be a bit... easier?

@mpdude

mpdude commented Mar 4, 2021

Copy link
Copy Markdown
Member

With "easier", I meant less hassle with backticks, (double) backslashes, escaping... and maybe working in cross-platform matrix builds, because Set-Content is probably something Windows-specific?

@cecton

cecton commented Mar 4, 2021

Copy link
Copy Markdown
Contributor Author

With "easier", I meant less hassle with backticks, (double) backslashes, escaping... and maybe working in cross-platform matrix builds, because Set-Content is probably something Windows-specific?

It's powershell specific yes.

Wouldn't setting CARGO_NET_GIT_FETCH_WITH_CLI=1 in the env section of GHA workflows be a bit... easier?

I will add that to the documentation. Using the Git CLI everywhere is not necessarily desired.

@mpdude

mpdude commented Mar 4, 2021

Copy link
Copy Markdown
Member

Thank you @cecton!

@mpdude mpdude merged commit 5f95203 into webfactory:master Mar 4, 2021
@cecton cecton deleted the doc-for-use-with-cargo branch March 4, 2021 12:17
@cecton

cecton commented Mar 4, 2021

Copy link
Copy Markdown
Contributor Author

Thanks to you for maintaining this project

@mpdude

mpdude commented Mar 4, 2021

Copy link
Copy Markdown
Member

If you like it, spread the word 😉

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants