git2-rs icon indicating copy to clipboard operation
git2-rs copied to clipboard

Automatic CLI fallback

Open kornelski opened this issue 4 years ago • 2 comments

libgit2 is known for having issues with some authentication methods and SSH URLs. The common solution to this is to use git CLI as a fallback.

Currently every user of the git2 crate has to implement the fallback themselves. There are over 500 crates that use git2, so for users who need a better auth, it's a whack-a-mole of crates that aren't quite working.

I suggest adding the fallback to the git2 crate itself, so that all downstream users are automatically improved. The fallback could be controlled via env variable, so users who need the fallback could enable it once for all Rust crates.

kornelski avatar Aug 02 '20 12:08 kornelski

any update?...

let4be avatar Jun 02 '21 14:06 let4be

If anyone wants to take a crack at this, let's build a list of things to be done.

  • Make a list of cases git2 doesn't behave correctly.
  • Prioritize the list, discuss and decide which ones to implement immediately.
  • Make a list of workarounds employed by different users of this crate.
  • Discuss and decide which workaround to choose, make sure it doesn't break existing use cases.
  • Figure out which files/functions do we need to patch.
  • Code and run tests

itsfarseen avatar Dec 10 '21 17:12 itsfarseen