git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: credential-helpers + remote-helper, starting point?

From
Jeff King <peff@peff.net>
Date
May 24, 2012, 18:21 UTC
Message-ID
<20120524182110.GE3161@sigill.intra.peff.net>
In-Reply-To
<b13df32797edbe8f71c796dbb4dc06a5@telesun.imag.fr>
On Thu, May 24, 2012 at 05:14:35PM +0200, roucherj wrote:
Show 5 quoted lines
> I want to know if anyone can help me with git-credential-helpers we
> are trying to use git-credential-helpers in the git-mediawiki
> (implemented as a remote-helper).
> We need to ask for the login/pass of the wiki and it would be nice if
> we can use credential-helpers to manage this credentials.
Yeah, I think it makes sense to use the credential-helpers.
> Anyone can send me a starting point, like a url with the
> documentation of git-credential-helpers?
Try:
  https://github.com/git/git/blob/master/Documentation/technical/api-credentials.txt

But that is the C API, and I assume you are building on the existing mediawiki helper that is written in perl. So I think what you really want is a "git credential" command that will let scripts hook into the credential API. Something like:

  $ git credential get https://example.com
  username=bob
  password=secret
  $ cat <<\EOF | git credential store https://example.com
  username=bob
  password=secret
  EOF
  $ cat <<\EOF | git credential erase https://example.com
  username=bob
  password=secret
  EOF

I had planned eventually to do something like this for git-svn, but realized that it was more sane to just let svn library handle the credential storage.

Do you guys want to try writing "git credential" as above? It might be a fun side project, but I know you are also on a limited timeframe for your project. I can work on it if you don't have time.

-Peff
Previous: roucherjNext: Matthieu Moy
Message 2 of 9 in “credential-helpers + remote-helper, starting point?”
  1. roucherjMay 24, 2012
  2. Jeff KingMay 24, 2012
  3. Matthieu MoyMay 24, 2012
  4. Jeff KingMay 24, 2012
  5. Matthieu MoyMay 24, 2012
  6. Junio C HamanoMay 24, 2012
  7. Matthieu MoyMay 25, 2012
  8. roucherjMay 25, 2012
  9. Jeff KingMay 25, 2012

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.