]> git.ipfire.org Git - thirdparty/git.git/commitdiff
http.c: Avoid username prompt for certifcate credentials
authorRene Bredlau <git@unrelated.de>
Fri, 21 Dec 2012 16:31:19 +0000 (17:31 +0100)
committerJunio C Hamano <gitster@pobox.com>
Fri, 21 Dec 2012 18:19:40 +0000 (10:19 -0800)
If sslCertPasswordProtected is set to true do not ask for username to decrypt rsa key. This question is pointless, the key is only protected by a password. Internaly the username is simply set to "".

Signed-off-by: Rene Bredlau <git@unrelated.de>
Acked-by: Jeff King <peff@peff.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
http.c

diff --git a/http.c b/http.c
index f9a9de141622549ec4338cbbfc2f430029696ebe..0b32cc6a29ed82b56b67c44d7b464a902c5bba86 100644 (file)
--- a/http.c
+++ b/http.c
@@ -236,6 +236,7 @@ static int has_cert_password(void)
                return 0;
        if (!cert_auth.password) {
                cert_auth.protocol = xstrdup("cert");
+               cert_auth.username = xstrdup("");
                cert_auth.path = xstrdup(ssl_cert);
                credential_fill(&cert_auth);
        }