From: Mike Ralphson <mike.ralphson@gmail.com>
To: Junio C Hamano <gitster@pobox.com>
Cc: Mike Gaffney <mr.gaffo@gmail.com>, git@vger.kernel.org
Subject: Re: [PATCH][v2] http authentication via prompts (with correct line lengths)
Date: Thu, 12 Mar 2009 08:53:20 +0000 [thread overview]
Message-ID: <e2b179460903120153u5fdb58b6tf3027eea23673df0@mail.gmail.com> (raw)
In-Reply-To: <7v63ihdgy6.fsf@gitster.siamese.dyndns.org>
2009/3/10 Junio C Hamano <gitster@pobox.com>:
> diff --git a/http.c b/http.c
> index f4f0bf6..3d5caa6 100644
> --- a/http.c
> +++ b/http.c
> @@ -25,6 +25,7 @@ static long curl_low_speed_limit = -1;
> static long curl_low_speed_time = -1;
> static int curl_ftp_no_epsv;
> static const char *curl_http_proxy;
> +static char *user_name, *user_pass;
>
> static struct curl_slist *pragma_header;
>
> @@ -135,6 +136,20 @@ static int http_options(const char *var, const char *value, void *cb)
> return git_default_config(var, value, cb);
> }
>
> +static void init_curl_http_auth(CURL *result)
> +{
> + if (!user_name)
> + curl_easy_setopt(result, CURLOPT_NETRC, CURL_NETRC_OPTIONAL);
> + else {
> + struct strbuf up = STRBUF_INIT;
> + if (!user_pass)
> + user_pass = xstrdup(getpass("Password: "));
> + strbuf_addf(&up, "%s:%s", user_name, user_pass);
> + curl_easy_setopt(result, CURLOPT_USERPWD,
> + strbuf_detach(&up, NULL));
> + }
> +}
> +
Elsewhere we seem to protect use of CURL_NETRC_OPTIONAL by checking
for LIBCURL_VERSION_NUM >= 0x070907. I have an ancient curl here
(curl-7.9.3-2ssl) which doesn't seem to have this option, so building
next is broken on AIX for me from this morning (c33976cb).
Is there a specific minimum version of curl we want to continue supporting?
Mike
next prev parent reply other threads:[~2009-03-12 8:54 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-10 0:08 [PATCH][v2] http authentication via prompts (with correct line lengths) Mike Gaffney
2009-03-10 0:37 ` Junio C Hamano
2009-03-10 0:45 ` Johannes Schindelin
2009-03-10 3:25 ` Mike Gaffney
2009-03-10 10:43 ` Johannes Schindelin
2009-03-10 15:33 ` Mike Gaffney
2009-03-10 4:46 ` Mike Gaffney
2009-03-10 6:34 ` Junio C Hamano
2009-03-10 8:08 ` Daniel Stenberg
2009-03-10 8:35 ` Junio C Hamano
2009-03-12 8:53 ` Mike Ralphson [this message]
2009-03-12 8:59 ` Daniel Stenberg
2009-03-12 9:12 ` Mike Ralphson
2009-03-12 9:24 ` Daniel Stenberg
2009-03-13 5:53 ` Junio C Hamano
2009-03-13 7:58 ` Daniel Stenberg
2009-03-13 10:53 ` Mike Ralphson
2009-03-14 5:55 ` Junio C Hamano
2009-03-13 12:47 ` Mike Gaffney
2009-03-14 6:43 ` Junio C Hamano
-- strict thread matches above, loose matches on Subject: below --
2009-03-17 5:15 Amos King
2009-03-17 6:27 ` Junio C Hamano
2009-03-17 6:47 ` Junio C Hamano
2009-03-17 16:24 ` Daniel Barkalow
2009-03-18 22:41 ` Amos King
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=e2b179460903120153u5fdb58b6tf3027eea23673df0@mail.gmail.com \
--to=mike.ralphson@gmail.com \
--cc=git@vger.kernel.org \
--cc=gitster@pobox.com \
--cc=mr.gaffo@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).