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

cargo crev fetch does not work with ssh URLs #249

Open
BatmanAoD opened this issue Oct 7, 2019 · 8 comments
Open

cargo crev fetch does not work with ssh URLs #249

BatmanAoD opened this issue Oct 7, 2019 · 8 comments

Comments

@BatmanAoD
Copy link

I am unable to use crev fetch with git@ (ssh) URLs.

> RUST_BACKTRACE=1 cargo crev fetch url [email protected]:dpc/crev-proofs.git
Fetching [email protected]:dpc/crev-proofs.git... Error: authentication required but no callback set; class=Ssh (23)

Using the same fetch command with an https URL works.

crev was installed using cargo; I am running on Mac OS X Mojave (10.14.6).

> cargo crev --version
cargo-crev-crev 0.9.0
@dpc
Copy link
Collaborator

dpc commented Oct 7, 2019

In principle the proof repos should be open for public. And we fetch them using libgit2 so handling authentication challenge might be tricky here.

Definitely low prio for me right now. "Just use https" for now. PRs always welcome though.

@BatmanAoD
Copy link
Author

Fair enough; I was only using ssh accidentally. Just thought it was worth noting, especially in case someone else tries this and sees the same failure!

@dpc
Copy link
Collaborator

dpc commented Oct 8, 2019

We could detect the link not be http(s) and warn the user...

@BatmanAoD
Copy link
Author

BatmanAoD commented Oct 8, 2019 via email

@dpc
Copy link
Collaborator

dpc commented Oct 8, 2019

Oh dear. I don't know. And it's a minor enough case, that I'll just ignore it for now. :D

@pickfire
Copy link

pickfire commented Jun 2, 2021

Yup, it affected me as well. I can't take fetch my own review. Because in my git config I did.

[url "[email protected]:pickfire"]
        insteadOf = https://github.com/pickfire

Is there any way to just force https in cargo crev?

ERROR: Error: Failed to fetch https://github.com/pickfire/crev-proofs: authentication required but no callback set; class=Ssh (23)

@dpc
Copy link
Collaborator

dpc commented Jun 5, 2021

I doubt there's one generic way to force it. We could however (probably) register a callback or something and at very least print some useful info - like a link to a Wiki page. If anyone is feeling brave - please take a stab at writing a PR, otherwise we might get to it at some point. :)

@pickfire
Copy link

pickfire commented Jun 5, 2021

The issue is probably due to libgit2 rust-lang/git2-rs#600

git clone works with the same url though. Maybe once gitoxide crate can do cloning we can use that as alternative.

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

No branches or pull requests

3 participants