add 'git credential' plumbing command
The credential API is in C, and not available to scripting languages. Expose the functionalities of the API by wrapping them into a new plumbing command "git credentials". In other words, replace the internal "test-credential" by an official Git command. Most documentation writen by: Jeff King <peff@peff.net> Signed-off-by: Pavel Volek <Pavel.Volek@ensimag.imag.fr> Signed-off-by: Kim Thuat Nguyen <Kim-Thuat.Nguyen@ensimag.imag.fr> Signed-off-by: Javier Roucher Iglesias <Javier.Roucher-Iglesias@ensimag.imag.fr> Signed-off-by: Matthieu Moy <Matthieu.Moy@imag.fr> Signed-off-by: Junio C Hamano <gitster@pobox.com>
This commit is contained in:

committed by
Junio C Hamano

parent
fd378070c8
commit
e30b2feb1b
@ -241,42 +241,9 @@ appended to its command line, which is one of:
|
||||
Remove a matching credential, if any, from the helper's storage.
|
||||
|
||||
The details of the credential will be provided on the helper's stdin
|
||||
stream. The credential is split into a set of named attributes.
|
||||
Attributes are provided to the helper, one per line. Each attribute is
|
||||
specified by a key-value pair, separated by an `=` (equals) sign,
|
||||
followed by a newline. The key may contain any bytes except `=`,
|
||||
newline, or NUL. The value may contain any bytes except newline or NUL.
|
||||
In both cases, all bytes are treated as-is (i.e., there is no quoting,
|
||||
and one cannot transmit a value with newline or NUL in it). The list of
|
||||
attributes is terminated by a blank line or end-of-file.
|
||||
|
||||
Git will send the following attributes (but may not send all of
|
||||
them for a given credential; for example, a `host` attribute makes no
|
||||
sense when dealing with a non-network protocol):
|
||||
|
||||
`protocol`::
|
||||
|
||||
The protocol over which the credential will be used (e.g.,
|
||||
`https`).
|
||||
|
||||
`host`::
|
||||
|
||||
The remote hostname for a network credential.
|
||||
|
||||
`path`::
|
||||
|
||||
The path with which the credential will be used. E.g., for
|
||||
accessing a remote https repository, this will be the
|
||||
repository's path on the server.
|
||||
|
||||
`username`::
|
||||
|
||||
The credential's username, if we already have one (e.g., from a
|
||||
URL, from the user, or from a previously run helper).
|
||||
|
||||
`password`::
|
||||
|
||||
The credential's password, if we are asking it to be stored.
|
||||
stream. The exact format is the same as the input/output format of the
|
||||
`git credential` plumbing command (see the section `INPUT/OUTPUT
|
||||
FORMAT` in linkgit:git-credential[7] for a detailed specification).
|
||||
|
||||
For a `get` operation, the helper should produce a list of attributes
|
||||
on stdout in the same format. A helper is free to produce a subset, or
|
||||
|
Reference in New Issue
Block a user