libgit2 / libgit2/libgit2

How to use credentials from git-credential helper

Open
#4,873 4 comments 2 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

feature
Dominant language
C
Stars
10.6k
Forks
2.7k
PR merge metrics
No merged PRs in 30d

Description

Is it possible to make libgit2 authenticate using credentials that the user has previously stored via the command line git? Specifically Git for Windows defaults to storing credentials in Git Credential Manager for Windows which speaks the credential helper protocol.

I think this involves shelling out to git credential fill but maybe there is more to it. Is there an example that implements something like this? A git_cred_ helper function would also be very useful.

@dscho

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

Start by reviewing libgit2's credential handling and the Git credential helper protocol, especially the proposed git credential fill interaction and Git Credential Manager for Windows. Determine whether the project should support stored command-line credentials or document an example, and consider the requested git_cred_ helper; done means the supported approach is decided and demonstrated.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.