๐Ÿš€ go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: linux.kernel.git
Article #1197

Re: Feature request: update password in remote URL

#1197
From: "brian m. carlson"
Date: Thu, 22 Oct 2026 21:19
74 lines
12156 bytes
--d+RU3Wu1WQG28adC
Content-Type: text/plain; charset=utf-8
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On 2026-10-22 at 09:52:27, J=C3=A1n Waclawek wrote:
> It would be useful to have a Git command that replaces only the
> password embedded in a remote URL, preserving the username, hostname,
> path, and other URL components.
>=20
> For example:
>=20
> git remote set-password origin NEW_PASSWORD
>=20
> Security policies on various git servers stipulate to change password
> relatively often. Currently, if a password expires or changes, users
> must reconstruct the remote URL with the new password or use a script
> to modify it. A dedicated command would make this operation simpler
> and less error-prone.
>=20
> The command should replace only the password component and preserve
> all other parts of the URL unchanged.
>=20
> I am aware of existence of credential managers, but sometimes they are
> just too much. I also understand that storing passwords in remote URLs
> has security drawbacks, but this feature would help users who already
> use the embedded credentials, work with servers that require URL-based
> credentials and understand those drawbacks.

I don't think we're going to implement or accept such a feature.  In
fact, we've discussed disallowing URL-based credentials altogether a
couple times on the list.  The only reason we haven't done so is that
we agree it's convenient for test environments where the credentials
have no value.

We also know that since the URL is stored in the config file, it's
actually very frequent that people expose the config file (such as on
web servers in some cases) and then they've exposed their credentials;
this is especially bad if the credentials are read-write, since then the
repository can be written to.

Credential helpers can actually be very simple to use and the Git FAQ
provides an example[0] of how to use one to read credentials from an
environment variable.  There's also `git-credential-store`, which is
shipped with Git and which also uses a plaintext file, but not one under
the repository by default.

You can also use SSH with a public key if your server supports it and
you can use something like a deploy key to let systems automatically
fetch and push if necessary.

So for those reasons (and probably some others I've forgotten), we're
not really interested in making support for using credentials in the URL
easier given there are much better alternatives.

[0] https://git-scm.com/docs/gitfaq#http-credentials-environment
--=20
brian m. carlson (they/them)
Toronto, Ontario, CA

--d+RU3Wu1WQG28adC
Content-Type: application/pgp-signature; name=signature.asc

-----BEGIN PGP SIGNATURE-----

wr0EABYKAG8Fgmrafe4JEHwMSWKIh6KBRxQAAAAAAB4AIHNhbHRAbm90YXRpb25z
LnNlcXVvaWEtcGdwLm9yZ9ZzYlBdzNzb6VMsqu1Vkm4tqhEX/fDr0GdT+aK9c6M/
FiEECCzmip28ZfuD0cORfAxJYoiHooEAAKO9AQD4Lhclmct9vsONfgxuLJ1Wtili
W72+Iv4/SK1NaVGrpwEA3BmovPZgtMhWuVwin4Swu6Lh60gjkT7aAGzoG1EwEAo=
=tXqf
-----END PGP SIGNATURE-----

--d+RU3Wu1WQG28adC--
Technical Details
Message-ID: <atp97X1NaNIWCG9z@fruit.crustytoothpaste.net>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72905-linux-kernel-git=dewy.ru
References: <CA+jzbCGmDYCS5XZmEnYpZ31a-cV5bncR04xv2BXz3eCyhBuCiQ@mail.gmail.com>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!git+bounces-72905-linux-kernel-git=dewy.ru
From: sandals@crustytoothpaste.net ("brian m. carlson")
Newsgroups: linux.kernel.git
Subject: Re: Feature request: update password in remote URL
Date: Thu, 22 Oct 2026 21:19:42 +0000
Organization: Usenet Network
Message-ID: <atp97X1NaNIWCG9z@fruit.crustytoothpaste.net>
References: <CA+jzbCGmDYCS5XZmEnYpZ31a-cV5bncR04xv2BXz3eCyhBuCiQ@mail.gmail.com>
MIME-Version: 1.0
Content-Type: multipart/signed; micalg=pgp-sha512;
	protocol="application/pgp-signature"; boundary="d+RU3Wu1WQG28adC"
Injection-Info: usenet.network;
	logging-data="336931"; mail-complaints-to="abuse@usenet.network"
Cancel-Lock: sha1:Q7nkRy7YSwiG81/OPNi9XCs7i+w= sha256:ZSzvTHxaVpVFcfw8T09PpQ4edZhjFrWuEaqy3zc4luI=
	sha1:y6SgplTq68PP6pk9KJaIWgCGWW4= sha256:6ewDMjAM0DBgrRl1OdMFJh4Jgzu7WlP7nOFMG4NYLjU=
Content-Disposition: inline
List-ID: <git.vger.kernel.org>
X-Mailpost-Empty-Hdrs: X-Spam-Level
X-Received: from localhost (localhost [127.0.0.1])
	by mail.dewy.ru (Postfix) with ESMTP id 4EFDE111382; Fri, 23 Oct 2026 00:20:49 +0300 (MSK)
X-Virus-Scanned: Debian amavisd-new at usenet.network
X-Spam-Flag: NO
X-Spam-Score: -1.949
X-Spam-Status: No, score=-1.949 tagged_above=-9999 required=6.31
	tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIM_SIGNED=0.1,
	DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1,
	HEADER_FROM_DIFFERENT_DOMAINS=0.25, MAILING_LIST_MULTI=-1,
	RCVD_IN_DNSWL_MED=-2.3, SPF_HELO_NONE=0.001, SPF_PASS=-0.001,
	URIBL_BLOCKED=0.001] autolearn=ham autolearn_force=no
X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (3072-bit key)
	header.d=crustytoothpaste.net
X-Received: from mail.dewy.ru ([127.0.0.1])
	by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024)
	with ESMTP id 9e1OKNAkgzdI;
	Fri, 23 Oct 2026 00:20:46 +0300 (MSK)
X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=git+bounces-72905-linux-kernel-git=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> 
X-Authentication-Results: OpenDMARC; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net
X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10])
	by mail.dewy.ru (Postfix) with ESMTPS id C3EA4111359; Fri, 23 Oct 2026 00:20:36 +0300 (MSK)
X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.77.114.92])
	by sea.lore.kernel.org (Postfix) with ESMTP id 55F9028E01; Thu, 22 Oct 2026 21:19:47 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass;
	t=1792703986;
	b=Xe4mrQtOH+4D4iPKsVjMFKlkgVUq/a92X/nB4NxZIauCPf06MaYxmRXOh+W40hSaK9At
	 tYbNnPkbMgJB1TnDrDVIa3485VaJtHDA0/cEr+01r+J6KpkMjoq+KKYr9Sf2G/UyKWpWH
	 g6aOraHahqRzOnX65nXp0OdI1FlRpsu2hFB0o6dEfg6/jJfnqDvn5Zt2sKFhICv6tJuXB
	 yrWfF2dwlbS21mCT1btMdYwRXYsvhhxxm0qcxEkL09PjjyIbpINomCE72Nz31I5GhCNRJ
	 4lz/aVuhcmSn2l7/HEjWMLgDYMXl24WdhzcVA5K7auOj/nTprwFQ5P2PPWaJJlmNOdw==
X-ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792703986;
	h=X-Original-To:Received:DMARC-Filter:DKIM-Signature:Received:Date:
	 From:To:Cc:Subject:Message-ID:Mail-Followup-To:References:
	 X-Mailing-List:List-Id:List-Post:List-Help:List-Subscribe:
	 List-Unsubscribe:List-Owner:Precedence:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To:User-Agent;
	bh=To+iE1ujYzXRnLEb9YKUiZIRjrH/U4UpEZoUhftA6hg=;
	b=LT0i3CzzDSHnbhQ1bZyjK+NxXQHNK9kCjahloYtyeDRNVWiFU1lfR3v0NogJNYhuTJrX
	 j36huGqGCfNbUOgIG55qAnNh/SPStG1eb4KORpnEDWAxq1Bifa9J5jkXkLluX+D3MQz2a
	 fooMTgzCzJFOVZpnOk3MgrY0D2EZ2PGqEaBe089OIiTL5Xa62oJT0p++s4fcf+g8Hwho3
	 mnB63Z98+SGUvwZOjv1tZu7awMbAeMotKvTAj2z5Fcwwb7DB2h5/FimBdy7ye9KgKXVwI
	 jhwr86EOKAH3PvflY2J/T45h+zXq4iauiFhrIEslUZy22zqh6+JVdLdyA1XbRCuxijw==
X-ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; 
	dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=gtwiYvYz;
	dmarc=none header.from=crustytoothpaste.net;
	spf=pass smtp.mailfrom=crustytoothpaste.net;
	arc=pass header.oldest-pass=0 smtp.remote-ip=127.0.0.1
X-Received: from localhost.localdomain (localhost [127.0.0.1])
	by smtp.subspace.kernel.org (Postfix) with ESMTP id A5646606A321;
	Thu, 22 Oct 2026 21:19:46 +0000 (UTC)
X-Authentication-Results: smtp.subspace.kernel.org;
	dkim=pass (3072-bit key, unprotected) header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=gtwiYvYz
X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=172.105.7.114
X-ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none;
	t=1792703985;
	b=cbLM/U8WTudjgR/SvsZP/snasufBNxNRyuknmr3igvCWnTVqJP0hS2SBupsOX6DGSZCk
	 +M2TTXT6GpYC/iVSR+uy8LYgChYrhnF2vGu+OZMei+sV5T4BiN6Ch4F/ajp12YK/i3kFe
	 o6F3GrXQWssUc8h1/rSjJCPIzcQWksNaXEsb2juWaDIzbqtvw15+Oa3F8cWL3iuCUCUVs
	 T53RXAywPGegFIUHa78rfJ3+oOtd4QFSaNeQtj+qI78cR3XuAtM2KZWwQpEeyafX+euiN
	 g/bbnd6gquHP8wGsRj2kK+sINOuY/CL8xnxlO9gAtnGf881SrglclnFI5L2Isx8Oizg==
X-ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015;
	a=rsa-sha256; c=relaxed/relaxed; t=1792703985;
	h=DMARC-Filter:DKIM-Signature:Received:Date:From:To:Cc:Subject:
	 Message-ID:Mail-Followup-To:References:MIME-Version:Content-Type:
	 Content-Disposition:In-Reply-To:User-Agent;
	bh=To+iE1ujYzXRnLEb9YKUiZIRjrH/U4UpEZoUhftA6hg=;
	b=J0vq5m1ZdaRQKQptA/eZqZy3rpqIi2yLTg6RRRwz1CtyaWpKj5i00me28jc04aIMj1wZ
	 ffeBZV8BoBzXBtaZPlKgK1WuRjWTqKBj+6rJEHbRtiCpZgu1RxOuYqV3tLo9PPCsZ69HG
	 +VUxxK94Wi+4KhGbZr8fILlZqUndArDvNLibwKuulS0gbkww1zi4kaNEiALbl8dSnhoKr
	 0Ylsn3ZhqGryKqL2wYmNRFeMCOKUIyDqQrhgQyOJejkxlG5oXgBFVRhCuoG3HcUacCugn
	 K6jWxVo2A/gW3QHTAscp6dvMtV9PD6ZQrXQuRL+Vwa9V1bSKy22DHcZ8ZEEHX9H5uuA==
X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; 
	dmarc=none header.from=crustytoothpaste.net;
	spf=pass smtp.mailfrom=crustytoothpaste.net;
	dkim=pass header.d=crustytoothpaste.net header.i=@crustytoothpaste.net header.a=rsa-sha256 header.s=default header.b=gtwiYvYz;
	arc=none smtp.remote-ip=172.105.7.114
X-Received: from complex.crustytoothpaste.net (complex.crustytoothpaste.net [172.105.7.114])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange X25519 server-signature ECDSA (prime256v1))
	(No client certificate requested)
	by smtp.subspace.kernel.org (Postfix) with ESMTPS id 0825E606A319
	for <git@vger.kernel.org>; Thu, 22 Oct 2026 21:19:44 +0000 (UTC)
X-DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 0825E606A319
X-Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=crustytoothpaste.net
X-Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=crustytoothpaste.net
X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=crustytoothpaste.net;
	s=default; t=1792703983;
	bh=Cj2U35snBAW+5NN8G7wcjbJQSHmx/OHclvL3YWGlPOw=;
	h=Date:From:To:Cc:Subject:References:Content-Type:
	 Content-Disposition:In-Reply-To:From:Reply-To:Subject:Date:To:CC:
	 Resent-Date:Resent-From:Resent-To:Resent-Cc:In-Reply-To:References:
	 Content-Type:Content-Disposition;
	b=gtwiYvYzrttxlfbdsHoki7sMLhFZOi+h/1sXv7BGV6Kqi5YFXbHB5sgMysPdAQ+DL
	 IkmUFCdHiNViH5SOimjX7iJB5ZTjkrfdZGTmKUJlIkMqsBZWYBneKb8UVWuaQExtsa
	 p+uEnsgQl2vgwTXQPbPN2+60wqgO/54ne48jr8TbIJ/4ZAwpqZvgbHIpkutonH8KJb
	 iFOVA3qe6JWcmG8kIFeMFLqZzI/Tmh+CujH9JVCkoEFHgX/ldXbfRtvNAd/g6HH/dM
	 kCPsyH90QldiGig38O/4bRgAoWeCmOCUo6ELCMo/5CrUnZgKZUCw79wrdaJSf3hq9F
	 BNRVazeLt49oNbm+4q4DH30dtfbiQgWYxvVdQLzEEE/HpXUE/Sz2/GvVaYUAlaPHxt
	 /Oao8nBSjERbdy0VevToDpoI/z0KOOV3+p61tDP88uuf/dzHfAA6nxFC//bi94fZIB
	 9zgp5VAY1U7hW6+KfpwLqX/NfFFzWTrkk64pGTti82YMuOrISA9
X-Received: from fruit.crustytoothpaste.net (unknown [IPv6:2607:f2c0:f00f:f901:b44d:c6f6:4e4b:66bf])
	(using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
	 key-exchange ECDHE (prime256v1) server-signature ECDSA (prime256v1) server-digest SHA256)
	(No client certificate requested)
	by complex.crustytoothpaste.net (Postfix) with ESMTPSA id C1CA12006B;
	Thu, 22 Oct 2026 21:19:43 +0000 (UTC)
X-Cc: git@vger.kernel.org
X-Mail-Followup-To: "brian m. carlson" <sandals@crustytoothpaste.net>,
	Jรกn Waclawek <jan.waclawek@taphome.com>,
	git@vger.kernel.org
X-Mailing-List: git@vger.kernel.org
X-List-Post: <mailto:git@vger.kernel.org>
X-List-Help: <mailto:git+help@vger.kernel.org>
X-List-Subscribe: <mailto:git+subscribe@vger.kernel.org>
X-List-Unsubscribe: <mailto:git+unsubscribe@vger.kernel.org>
X-List-Owner: <mailto:git+owner@vger.kernel.org>
X-Precedence: list
X-In-Reply-To: <CA+jzbCGmDYCS5XZmEnYpZ31a-cV5bncR04xv2BXz3eCyhBuCiQ@mail.gmail.com>
X-User-Agent: Mutt/2.4.1 (2026-07-04)