@ -846,7 +844,7 @@ static int http_request(const char *url, void *result, int target, int options)
@@ -846,7 +844,7 @@ static int http_request(const char *url, void *result, int target, int options)
else if (missing_target(&results))
ret = HTTP_MISSING_TARGET;
else if (results.http_code == 401) {
if (user_name) {
if (user_name && user_pass) {
ret = HTTP_NOAUTH;
} else {
/*
@ -855,7 +853,8 @@ static int http_request(const char *url, void *result, int target, int options)
@@ -855,7 +853,8 @@ static int http_request(const char *url, void *result, int target, int options)
* but that is non-portable. Using git_getpass() can at least be stubbed
* on other platforms with a different implementation if/when necessary.