2 #include "credential.h"
3 #include "parse-options.h"
4 #include "string-list.h"
6 int main(int argc
, const char **argv
)
8 const char * const usage
[] = {
9 "git credential-getpass [options]",
12 struct credential c
= { NULL
};
14 struct option options
[] = {
15 OPT_BOOLEAN(0, "reject", &reject
,
16 "reject a stored credential"),
17 OPT_STRING(0, "username", &c
.username
, "name",
18 "an existing username"),
19 OPT_STRING(0, "description", &c
.description
, "desc",
20 "human-readable description of the credential"),
21 OPT_STRING(0, "unique", &c
.unique
, "token",
22 "a unique context for the credential"),
26 argc
= parse_options(argc
, argv
, NULL
, options
, usage
, 0);
28 usage_with_options(usage
, options
);
33 credential_getpass(&c
);
34 printf("username=%s\n", c
.username
);
35 printf("password=%s\n", c
.password
);