mirror of
https://github.com/git/git.git
synced 2026-03-14 18:59:04 +01:00
When an http request receives a 401, we ask the user for both a username and password. While it's generally not a good idea for us to store the password in plaintext, having to input the username each time is annoying, and can be easily solved with a config variable. This patch teaches the credential subsystem to look up items in the git config file before prompting. Items are indexed by the "unique" token passed to the credential system. Signed-off-by: Jeff King <peff@peff.net> Signed-off-by: Junio C Hamano <gitster@pobox.com>
21 lines
522 B
C
21 lines
522 B
C
#ifndef CREDENTIAL_H
|
|
#define CREDENTIAL_H
|
|
|
|
struct credential {
|
|
char *description;
|
|
char *username;
|
|
char *password;
|
|
char *unique;
|
|
};
|
|
|
|
struct string_list;
|
|
|
|
int credential_getpass(struct credential *);
|
|
void credential_from_config(struct credential *);
|
|
|
|
int credential_fill_gently(struct credential *, const struct string_list *methods);
|
|
void credential_fill(struct credential *, const struct string_list *methods);
|
|
void credential_reject(struct credential *, const struct string_list *methods);
|
|
|
|
#endif /* CREDENTIAL_H */
|