From: Eric Sunshine <email@example.com> To: Jeff King <firstname.lastname@example.org> Cc: Johannes Schindelin <Johannes.Schindelin@gmx.de>, Ævar Arnfjörð Bjarmason <email@example.com>, Martin Langhoff <firstname.lastname@example.org>, Git Mailing List <email@example.com> Subject: Re: [PATCH 3/3] clone: auto-enable git-credential-store when necessary Date: Mon, 20 May 2019 07:28:08 -0400 Message-ID: <CAPig+cTkjJjuyrDOUh92B16an+wy9OnZgyKY0-bihWnzyWsoKg@mail.gmail.com> (raw) In-Reply-To: <20190519051604.GC19434@sigill.intra.peff.net> On Sun, May 19, 2019 at 2:42 PM Jeff King <firstname.lastname@example.org> wrote: > If the user clones with a URL containing a password and has no > credential helper configured, we're stuck. We don't want to write the > password into .git/config because that risks accidentally disclosing it. > But if we don't record it somewhere, subsequent fetches will fail unless > the user is there to input the password. > > But we can actually go a step further and enable the "store" helper for > them. [...] > > The biggest downside is that it's a bit magical from the user's > perspective, because now the password is off in some other file (usually > ~/.git-credentials, but sometimes in $XDG_CONFIG_HOME). Which > complicates things if they want to purge the repo and password, for > example, because now they can't just delete the repository directory. > > The file location is documented, though, and we point people to the > documentation. So perhaps it will be enough (and better still, may lead > to them configuring a more secure helper). I'm trying to decide how I feel about this based upon my own experience recently of having my password magically stored by Git for Windows without warning or consent on a computer which was not my own but on which I needed to access a private GitHub repository. Although the situation is not perfectly analogous, the concern of having one's password magically squirreled-away _somewhere_ unexpectedly is the same. Being unfamiliar with Git for Windows's credential helper or Windows credential management in general, I experienced more than a few minutes of consternation and alarm before finally figuring out where Git for Windows had stored my password and how to remove it. The sense of alarm and discomfort likely would have not arisen had the credential helper given me the opportunity to approve or deny the action. > static const char sanitized_url_advice = N_( > "The URL you provided to Git contains a password. It will be\n" > "used to clone the repository, but to avoid accidental disclosure\n" > +"the password will not be recorded in the repository config.\n" > +"Since you have no credential helper configured, the \"store\" helper\n" > +"has been enabled for this repository, and will provide the password\n" > +"for further fetches.\n" > +"\n" > +"Note that the password is still stored in plaintext in the filesystem;\n" > +"consider configuring a more secure helper. See \"git help gitcredentials\"\n" > +"and \"git help git-credential-store\" for details.\n" > ); Give the above experience, one way to mitigate such feelings of alarm might, at a minimum, be for this message to say where the password is being stored (and, possibly, how to remove it) so the user can do so immediately if desired. Prompting the user to approve or deny the action might also go a long way toward making this more palatable (assuming the session is interactive).
next prev parent reply index Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top 2019-05-15 17:49 Git ransom campaign incident report - May 2019 Martin Langhoff 2019-05-15 18:59 ` Ævar Arnfjörð Bjarmason 2019-05-16 4:27 ` Jeff King 2019-05-17 19:39 ` Johannes Schindelin 2019-05-17 22:20 ` Jeff King 2019-05-17 23:13 ` Martin Langhoff 2019-05-19 5:07 ` Jeff King 2019-05-19 5:10 ` [PATCH 1/3] transport_anonymize_url(): support retaining username Jeff King 2019-05-19 23:28 ` Eric Sunshine 2019-05-20 16:14 ` René Scharfe 2019-05-20 16:36 ` Johannes Schindelin 2019-05-20 16:43 ` Johannes Schindelin 2019-05-19 5:12 ` [PATCH 2/3] clone: avoid storing URL passwords in config Jeff King 2019-05-19 5:16 ` [PATCH 3/3] clone: auto-enable git-credential-store when necessary Jeff King 2019-05-20 11:28 ` Eric Sunshine [this message] 2019-05-20 12:31 ` Jeff King 2019-05-20 16:48 ` Johannes Schindelin 2019-05-20 13:56 ` Ævar Arnfjörð Bjarmason 2019-05-20 14:08 ` Jeff King 2019-05-20 15:17 ` Ævar Arnfjörð Bjarmason 2019-05-20 15:24 ` Jeff King 2019-05-20 17:08 ` Ævar Arnfjörð Bjarmason 2019-05-20 14:43 ` Git ransom campaign incident report - May 2019 Johannes Schindelin
Reply instructions: You may reply publically 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 List information: http://vger.kernel.org/majordomo-info.html * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=CAPig+cTkjJjuyrDOUh92B16an+wy9OnZgyKY0-bihWnzyWsoKg@mail.gmail.com \ --email@example.com \ --cc=Johannes.Schindelin@gmx.de \ --firstname.lastname@example.org \ --email@example.com \ --firstname.lastname@example.org \ --email@example.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
firstname.lastname@example.org list mirror (unofficial, one of many) Archives are clonable: git clone --mirror http://public-inbox.org/git git clone --mirror http://ou63pmih66umazou.onion/git git clone --mirror http://czquwvybam4bgbro.onion/git git clone --mirror http://hjrcffqmbrq6wope.onion/git Newsgroups are available over NNTP: nntp://news.public-inbox.org/inbox.comp.version-control.git nntp://ou63pmih66umazou.onion/inbox.comp.version-control.git nntp://czquwvybam4bgbro.onion/inbox.comp.version-control.git nntp://hjrcffqmbrq6wope.onion/inbox.comp.version-control.git nntp://news.gmane.org/gmane.comp.version-control.git note: .onion URLs require Tor: https://www.torproject.org/ AGPL code for this site: git clone https://public-inbox.org/ public-inbox