Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add note about using cargo with private dependencies #64

Merged
merged 4 commits into from
Mar 4, 2021

Conversation

cecton
Copy link
Contributor

@cecton cecton commented Mar 4, 2021

Related to #62

@cecton
Copy link
Contributor Author

cecton commented Mar 4, 2021

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

@mpdude
Copy link
Member

mpdude commented Mar 4, 2021

@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
Copy link
Contributor Author

cecton commented Mar 4, 2021

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

@mpdude
Copy link
Member

mpdude commented Mar 4, 2021

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
Copy link
Contributor Author

cecton commented Mar 4, 2021

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
Copy link
Member

mpdude commented Mar 4, 2021

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
Copy link
Member

mpdude commented Mar 4, 2021

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
Copy link
Contributor Author

cecton commented Mar 4, 2021

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
Copy link
Member

mpdude commented Mar 4, 2021

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
Copy link
Contributor Author

cecton commented Mar 4, 2021

Thanks to you for maintaining this project

@mpdude
Copy link
Member

mpdude commented Mar 4, 2021

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.

None yet

2 participants