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

This library appears to not function well (from upstream use) if you use ssh instead of https #37

Open
DarthHater opened this issue Jul 1, 2020 · 5 comments · Fixed by #129

Comments

@DarthHater
Copy link

See: crate-ci/cargo-release#218 (comment)

Essentially, I'm trying to use cargo-release to release a crate, and the first bits work. I am using:

OS X Catalina 10.15.4
git with ssh

git2 has issues using ssh instead of https, and as such an environment variable exists to tell cargo to use the git cli instead of git2, and a cargo setting, which can be seen here: rust-lang/cargo#2078

The publish bit works from cargo-release, and I imagine that's because it's using cargo itself. In cargo-release, they call crates_index::Index like so:

https://github.com/sunng87/cargo-release/blob/master/src/cargo.rs#L68-L96

Essentially, it would be nice if this library can bypass using git2 as well, respecting that cargo setting, or something else akin, as it's making it difficult to use this library in a context where git uses ssh.

@kornelski
Copy link
Collaborator

Maybe the git2 crate could add a git CLI fallback? This is going to be a problem for all users of that crate.

@DarthHater
Copy link
Author

@kornelski I'm not sure how they handled it in cargo, but I think what they did was create their own fallback. I don't imagine git2 would do that because it's more or less a wrapper of libgit2.

@kornelski
Copy link
Collaborator

kornelski commented Jul 2, 2020

git2 is used in 500 crates. That will require hundreds of crates to add the same workaround, instead of the one crate.

@kornelski
Copy link
Collaborator

rust-lang/git2-rs#600

@Byron
Copy link
Collaborator

Byron commented Aug 1, 2023

Apologies, this issue was auto-closed which wasn't actually my intention nor my doing even though GitHub claims it was 😅. Could you recheck to see if the issue is fixed with the latest version 2.0 or above? Thank you.

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

Successfully merging a pull request may close this issue.

3 participants