credential-helpers + remote-helper, starting point?

4 messages, 2 authors, 2016-06-15 · open the first message on its own page

credential-helpers + remote-helper, starting point?

From: roucherj <hidden>
Date: 2016-06-15 22:53:54

Hello,

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.

Anyone can send me a starting point, like a url with the documentation 
of git-credential-helpers?
To see how we can import credential-helpers for used with mediawiki.

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

From: Jeff King <hidden>
Date: 2016-06-15 22:53:54

On Thu, May 24, 2012 at 05:14:35PM +0200, roucherj wrote:
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

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

From: roucherj <hidden>
Date: 2016-06-15 22:53:54

On Thu, 24 May 2012 14:21:10 -0400, Jeff King wrote:
On Thu, May 24, 2012 at 05:14:35PM +0200, roucherj wrote:
quoted
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.
quoted
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
Jeff thanks you for helping me with use credentials-helpers with 
git-remote
I will try to code your proposed solution.
making something like that:

+-----+ -----> +----------------------+
| git |  pipe  | git-remote-mediawiki |
+-----+ <----- +----------------------+
                      /\      ||
                      || pipe ||
                      ||      \/
                  +----------------+ ----->  O
                  | git-credential | <----- -|-
                  +----------------+        / \
                      /\      ||            User
                      || pipe ||
                      ||      \/
                  +-------------------------+
                  | git-credentials-helpers |
                  +-------------------------+

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

From: Jeff King <hidden>
Date: 2016-06-15 22:53:54

On Fri, May 25, 2012 at 03:28:39PM +0200, roucherj wrote:
Jeff thanks you for helping me with use credentials-helpers with
git-remote
I will try to code your proposed solution.
making something like that:

+-----+ -----> +----------------------+
| git |  pipe  | git-remote-mediawiki |
+-----+ <----- +----------------------+
                     /\      ||
                     || pipe ||
                     ||      \/
                 +----------------+ ----->  O
                 | git-credential | <----- -|-
                 +----------------+        / \
                     /\      ||            User
                     || pipe ||
                     ||      \/
                 +-------------------------+
                 | git-credentials-helpers |
                 +-------------------------+
Exactly. Let me know if you run into any problems.

-Peff
Keyboard shortcuts
hback out one level
jnext message in thread
kprevious message in thread
ldrill in
Escclose help / fold thread tree
?toggle this help