aboutsummaryrefslogtreecommitdiff
path: root/remote.c
diff options
context:
space:
mode:
authorKnut Franke <k.franke@science-computing.de>2016-01-26 13:02:47 +0000
committerJunio C Hamano <gitster@pobox.com>2016-01-26 10:53:09 -0800
commitef976395e26a25fb6d048d859a1c8cddb2640b9a (patch)
tree7630031feb3f75f6657d5a320d62b1692f53aa22 /remote.c
parent754884255bb580df159e58defa81cdd30b5c430c (diff)
downloadgit-ef976395e26a25fb6d048d859a1c8cddb2640b9a.tar.gz
git-ef976395e26a25fb6d048d859a1c8cddb2640b9a.tar.xz
http: allow selection of proxy authentication method
CURLAUTH_ANY does not work with proxies which answer unauthenticated requests with a 307 redirect to an error page instead of a 407 listing supported authentication methods. Therefore, allow the authentication method to be set using the environment variable GIT_HTTP_PROXY_AUTHMETHOD or configuration variables http.proxyAuthmethod and remote.<name>.proxyAuthmethod (in analogy to http.proxy and remote.<name>.proxy). The following values are supported: * anyauth (default) * basic * digest * negotiate * ntlm Signed-off-by: Knut Franke <k.franke@science-computing.de> Signed-off-by: Elia Pinto <gitter.spiros@gmail.com> Helped-by: Junio C Hamano <gitster@pobox.com> Helped-by: Eric Sunshine <sunshine@sunshineco.com> Helped-by: Elia Pinto <gitter.spiros@gmail.com> Signed-off-by: Junio C Hamano <gitster@pobox.com>
Diffstat (limited to 'remote.c')
-rw-r--r--remote.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/remote.c b/remote.c
index 9d34b5a5d..0bb5a6983 100644
--- a/remote.c
+++ b/remote.c
@@ -428,6 +428,9 @@ static int handle_config(const char *key, const char *value, void *cb)
} else if (!strcmp(subkey, ".proxy")) {
return git_config_string((const char **)&remote->http_proxy,
key, value);
+ } else if (!strcmp(subkey, ".proxyauthmethod")) {
+ return git_config_string((const char **)&remote->http_proxy_authmethod,
+ key, value);
} else if (!strcmp(subkey, ".vcs")) {
return git_config_string(&remote->foreign_vcs, key, value);
}