git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [PATCH][v2] http authentication via prompts (with correct line lengths)

From
Junio C Hamano <gitster@pobox.com>
Date
Mar 10, 2009, 08:35 UTC
Message-ID
<7v1vt5bwsn.fsf@gitster.siamese.dyndns.org>
In-Reply-To
<alpine.DEB.1.10.0903100905050.14797@yvahk2.pbagnpgbe.fr>
Daniel Stenberg <daniel@haxx.se> writes:
Show 19 quoted lines
> On Mon, 9 Mar 2009, Junio C Hamano wrote:
>
>> The version of libcurl on my box is 7.18.something, and it does not
>> seem to ask for password when the URL has only username but not
>> colon-password. I also expected it to ask for password when
>> $HOME/.netrc has login but not password for a given machine, but
>> that does not seem to happen either. Perhaps the version is too old.
>
> No, that's entirely expected. libcurl has no "prompt the user if no
> password was given" logic but instead delegates that work to the
> application.
>
> There was once functionality for this (removed in October 2003) but it
> was broken and violated internal guidelines so we cut out and threw
> that code away.
>
> More recently there have been people interested in re-implementing
> this "the right way" but so far it hasn't been made and thus the
> application is left to perform this task.
It's always nice to find _the_ area expert around ;-)

I somehow misread the description on CURLOPT_NETRC that appears in http://curl.haxx.se/libcurl/c/curl_easy_setopt.html:

	libcurl uses a user name (and supplied or prompted password)
	supplied with CURLOPT_USERPWD in preference to any of the options
	controlled by this parameter.

especially the "or prompted password" part to mean that unless supplied to the library by the caller the library would prompt the user and obtain the password.

Thanks for clarification.
Previous: Daniel StenbergNext: Mike Ralphson
Message 10 of 20 in “[v2] http authentication via prompts (with correct line lengths)”
  1. [v2] http authentication via prompts (with correct line lengths)Mike Gaffney, Mar 10, 2009
  2. Junio C HamanoMar 10, 2009
  3. Johannes SchindelinMar 10, 2009
  4. Mike GaffneyMar 10, 2009
  5. Johannes SchindelinMar 10, 2009
  6. Mike GaffneyMar 10, 2009
  7. Mike GaffneyMar 10, 2009
  8. Junio C HamanoMar 10, 2009
  9. Daniel StenbergMar 10, 2009
  10. Junio C HamanoMar 10, 2009
  11. Mike RalphsonMar 12, 2009
  12. Daniel StenbergMar 12, 2009
  13. Mike RalphsonMar 12, 2009
  14. Daniel StenbergMar 12, 2009
  15. Junio C HamanoMar 13, 2009
  16. Daniel StenbergMar 13, 2009
  17. Mike RalphsonMar 13, 2009
  18. Junio C HamanoMar 14, 2009
  19. Mike GaffneyMar 13, 2009
  20. Junio C HamanoMar 14, 2009

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.