git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: M Hickford <mirth.hickford@gmail.com>
Cc: git@vger.kernel.org, sandals@crustytoothpaste.net,
	derrickstolee@github.com, stolee@gmail.com, avarab@gmail.com,
	Johannes.Schindelin@gmx.de, peff@peff.net
Subject: Changing transfer.credentialsInUrl to default to "warn"
Date: Sat, 11 Jan 2025 07:15:00 +0000	[thread overview]
Message-ID: <20250111071500.710169-1-mirth.hickford@gmail.com> (raw)

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

             reply	other threads:[~2025-01-11  7:15 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-11  7:15 M Hickford [this message]
2025-01-13 16:42 ` Changing transfer.credentialsInUrl to default to "warn" 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

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=20250111071500.710169-1-mirth.hickford@gmail.com \
    --to=mirth.hickford@gmail.com \
    --cc=Johannes.Schindelin@gmx.de \
    --cc=avarab@gmail.com \
    --cc=derrickstolee@github.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    --cc=sandals@crustytoothpaste.net \
    --cc=stolee@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).