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

Changing transfer.credentialsInUrl to default to "warn"

From
M Hickford <mirth.hickford@gmail.com>
Date
Jan 11, 2025, 07:15 UTC
Message-ID
<20250111071500.710169-1-mirth.hickford@gmail.com>
Including plaintext credentials in the remote URL risks inadvertent credentials exposure, as explained in docs https://git-scm.com/docs/git-config#Documentation/git-config.txt-transfercredentialsInUrl
Config key transfer.credentialsInUrl defaults to "allow", but if set to "warn", Git warns the user about plaintext credentials in the remote URL.
    $ git clone https://tim:hunter2@example.com/example.git
    warning: URL 'https://tim:<redacted>@example.com/example.git' uses plaintext credentials
In order to nudge users towards more secure practices (namely, using a credential helper), would anyone else be in favour of changing transfer.credentialsInUrl to default to "warn"? 
https://github.com/git/git/commit/6dcbdc0d6616d7fbd2445aa2237b22e3c172ea85
Show 5 quoted lines
> This change currently defaults the behavior to "allow" which does 
> nothing with these URLs. We can consider changing this behavior to
> "warn" by default if we wish. At that time, we may want to add some
> advice about setting fetch.credentialsInUrl=ignore for users who still
> want to follow this pattern (and not receive the warning).
Next: Junio C Hamano
Message 1 of 5 in “Changing transfer.credentialsInUrl to default to "warn"”
  1. M HickfordJan 11, 2025
  2. Junio C HamanoJan 13, 2025
  3. Johannes SchindelinJan 13, 2025
  4. Junio C HamanoJan 13, 2025
  5. brian m. carlsonJan 13, 2025

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.