-
Notifications
You must be signed in to change notification settings - Fork 90
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
Support using ssh
as id url
#387
Comments
Just to give you some quick help:
Your ID url should be read-only url that other people can use. If it's internal - it should be readable by people that are supposed to consume your proofs. You had a right instinct to use git to just change the url to ssh after the fact. Completely internal setups are not yet well tested/understood so please excuse the road-bumps. I am little bit in rush RN, so that's all for now. Please remind yourself if no one is going to get back to you in reasonable time. |
Thanks for your super quick reply! I'll explore more what is possible, I appreciate the feedback. Thanks again! |
I saw you released 0.19.1 with some error strings adapted. Thanks! After looking at the code, it seems that // Prepare callbacks.
let mut callbacks = git2::RemoteCallbacks::new();
callbacks.credentials(|_url, username_from_url, _allowed_types| {
git2::Cred::ssh_key_from_agent(username_from_url.unwrap())
});
// Prepare fetch options.
let mut fo = git2::FetchOptions::new();
fo.remote_callbacks(callbacks);
// Prepare builder.
let mut builder = git2::build::RepoBuilder::new();
builder.fetch_options(fo);
match builder.clone(git_ssh_url, &proof_dir) { So git remote operations will need to be changed to support ssh remotes. For now, I'll see if I can use https. What I did is: ❯ cargo crev id new --no-url
❯ cargo crev repo fetch url https://github.com/dpc/crev-proofs
❯ cargo crev id trust FYlr8YoYGVvDwHQxqEIs89reKKDy-oWisoO0qXXEfHE
❯ cargo crev repo git remote set-url --push origin https://[email protected]/nbigaouette/crev-proofs.git
current Id has been created without a git URL Looking at: |
Hi!
I am exploring
cargo-crev
for code review at my workplace. The reviews we would produce would be geared for our own use case and as such we would like to host the id repos in our internal git hosting.Right now, the getting started page mentions forking the github template and pointing to it with
cargo crev id new --url
.Because we have our own internal git repos, I manually cloned the github repo and pushed it to a new internal repo. I then used this url when creating my new id. Unfortunately, my git url is an
ssh
url which cargo-crev does not like::(
Exploring a bit I see that I can use
cargo crev id new --no-url
to create an id not linked to a git repo, which is what I did.Since I want to publish those reviews, I tried to set the ssh repo as the url but could not make this work:
Using
cargo crev id set-url https://...
with the https url provided by the repo's web interface I get the following:I now see a
cargo crev git
subcommand! Let's try it:🤔 That's definitely a bug in the error message if the
git
subcommand does not exists anymore...If I try to set the url with the https url but without my username, I see the following:
I can peek the git repo under
~/Library/Application Support/crev/proofs/internal_git_example__nbigaouette_crev_****
but I see a different git history from the original crev-proofs.git fork.So my questions are:
ssh
as the protocol for communicating with my proofs repo? If so, how should I proceed?Platform used: macOS Catalina 10.15.7.
Thanks a lot!!
The text was updated successfully, but these errors were encountered: