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

Re: [Wishlist] could git tell which password it is asking when asking a password.

From
Shawn Pearce <spearce@spearce.org>
Date
Jul 1, 2011, 17:18 UTC
Message-ID
<BANLkTi=aAinh=0jxb5MoqVOdUB7zxoy2XdSqk+pdsewLXU62ZA@mail.gmail.com>
In-Reply-To
<7v1uy9q5v1.fsf@alter.siamese.dyndns.org>
On Fri, Jul 1, 2011 at 10:16, Junio C Hamano <gitster@pobox.com> wrote:
Show 13 quoted lines
> Junio C Hamano <gitster@pobox.com> writes:
> diff --git a/http.c b/http.c
> index b2ae8de..44948a7 100644
> --- a/http.c
> +++ b/http.c
> @@ -209,8 +209,11 @@ static void init_curl_http_auth(CURL *result)
>  {
>        if (user_name) {
>                struct strbuf up = STRBUF_INIT;
> -               if (!user_pass)
> -                       user_pass = xstrdup(git_getpass("Password: "));
> +               if (!user_pass) {
> +                       strbuf_addf(&up, "Password for %s: ", user_name);

The user_name by itself may not be sufficient. I may also need the URL to correctly answer the question. I don't always use the same password on every website. :-)

As a human sure, I know what URL I asked Git to poke for me. But if I want to write a script that looks this up in a password manager for me, that script needs the URL.

Food for thought.
-- 
Shawn.
Previous: Junio C HamanoNext: Junio C Hamano
Message 4 of 15 in “[Wishlist] could git tell which password it is asking when asking a password.”
  1. Rémi VanicatJul 1, 2011
  2. Junio C HamanoJul 1, 2011
  3. Junio C HamanoJul 1, 2011
  4. Shawn PearceJul 1, 2011
  5. Junio C HamanoJul 1, 2011
  6. Rémi VanicatJul 1, 2011
  7. Ted ZlatanovJul 1, 2011
  8. Junio C HamanoJul 1, 2011
  9. Jeff KingJul 1, 2011
  10. Jeff KingJul 1, 2011
  11. Ted ZlatanovJul 1, 2011
  12. encrypted netrc for Git (was: [Wishlist] could git tell which password it is asking when asking a password.)Ted Zlatanov, Jul 14, 2011
  13. Jeff KingJul 14, 2011
  14. Ted ZlatanovJul 15, 2011
  15. Jeff KingJul 15, 2011

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.