git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Changing transfer.credentialsInUrl to default to "warn"
@ 2025-01-11  7:15 M Hickford
  2025-01-13 16:42 ` Junio C Hamano
  0 siblings, 1 reply; 5+ messages in thread
From: M Hickford @ 2025-01-11  7:15 UTC (permalink / raw)
  Cc: git, sandals, derrickstolee, stolee, avarab, Johannes.Schindelin,
	peff

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

> 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).

^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2025-01-13 22:27 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-01-11  7:15 Changing transfer.credentialsInUrl to default to "warn" M Hickford
2025-01-13 16:42 ` Junio C Hamano
2025-01-13 21:53   ` Johannes Schindelin
2025-01-13 22:27     ` Junio C Hamano
2025-01-13 21:54   ` brian m. carlson

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).