rust-lang / rust-lang/git2-rs

Automatic CLI fallback

Open
#600 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Rust
Stars
2.1k
Forks
450
Avg merge
11m
Merged PRs (30d)
1

Description

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.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Read the git2 crate's existing authentication and SSH URL handling, then compare the fallback behavior expected from the git CLI. Define the opt-in environment-variable behavior and how failures are surfaced; done means downstream users can enable the fallback centrally without implementing it themselves.

Written by the indexing model from the issue text.

Assessment

Tech stack
git, rust
Domain
authentication, cli
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.