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

Re: RFC: "git config -l" should not expose sensitive information

From
Jeff King <peff@peff.net>
Date
Dec 20, 2012, 15:04 UTC
Message-ID
<20121220150408.GD27211@sigill.intra.peff.net>
In-Reply-To
<50CF039A.7010800@gmx.de>
On Mon, Dec 17, 2012 at 12:35:54PM +0100, Toralf Förster wrote:
> often the output is requested in help forums - and a
> "git config -l | wgetpaste" exposes parameters like sendmail.smtppass -
> so hide those variables in the output (if not explicitly wanted) would
> makes sense, or ?

But if we change "git config -l", won't that break all of the non-exposing uses that rely on seeing all of the variables (e.g., it is perfectly fine for a porcelain to parse "git config -l" rather than making several calls to "git config"; IIRC, git-cola does this).

The problem seems to be that people are giving bad advice to tell people to post "git config -l" output without looking at. Maybe we could help them with a "git config --share-config" option that dumps all config, but sanitizes the output. It would need to have a list of sensitive keys (which does not exist yet), and would need to not just mark up things like smtppass, but would also need to pull credential information out of remote.*.url strings. And maybe more (I haven't thought too long on it).

-Peff
Previous: Toralf FörsterNext: Aaron Schrab
Message 2 of 10 in “RFC: "git config -l" should not expose sensitive information”
  1. Toralf FörsterDec 17, 2012
  2. Jeff KingDec 20, 2012
  3. Aaron SchrabDec 20, 2012
  4. Jeff KingDec 20, 2012
  5. Junio C HamanoDec 20, 2012
  6. Toralf FörsterDec 20, 2012
  7. Michael HaggertyDec 20, 2012
  8. Jeff KingDec 20, 2012
  9. Junio C HamanoDec 20, 2012
  10. Andrew ArdillDec 20, 2012

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.