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

Re: [PATCH 0/2] contrib/credential/netrc: Makefile + script cleanup

From
Jeff King <peff@peff.net>
Date
Dec 17, 2019, 02:48 UTC
Message-ID
<20191217024858.GA2734969@coredump.intra.peff.net>
In-Reply-To
<cover.1576531851.git.liu.denton@gmail.com>
On Mon, Dec 16, 2019 at 01:32:32PM -0800, Denton Liu wrote:
Show 8 quoted lines
> I recently switched my workflow to use this credential helper and I
> noticed a couple of problems:
> 
> 1. The interpreter path was hardcoded to #!/usr/bin/perl
> 
> 2. The script refuses to run outside of a Git repository
> 
> This patch series should fix these problems.
Both of these patches look good to me.

It does make me wonder if many people are using credential-netrc, given these pretty obvious problems. You're certainly welcome to use it if it works for you, but I am curious what made you pick it versus one of the other more advanced helpers.

I assume you're using a gpg-encrypted netrc (if not, you should probably just use credential-store). For "read-only" password access, I find the combination of pass[1] with config like this is a bit nicer:

  [credential "https://github.com"]
  username = peff
  helper = "!f() { test $1 = get && echo password=`pass github/oauth`; }; f"
-Peff
[1] https://www.passwordstore.org/
Previous: Denton LiuNext: Denton Liu
Message 4 of 9 in “contrib/credential/netrc: Makefile + script cleanup”
  1. 0/2 contrib/credential/netrc: Makefile + script cleanupDenton Liu, Dec 16, 2019
  2. 2/2 contrib/credential/netrc: work outside a repoDenton Liu, Dec 16, 2019
  3. 1/2 contrib/credential/netrc: make PERL_PATH configurableDenton Liu, Dec 16, 2019
  4. Jeff KingDec 17, 2019
  5. Denton LiuDec 17, 2019
  6. 0/2 contrib/credential/netrc: Makefile + script cleanupDenton Liu, Dec 20, 2019
  7. 1/2 contrib/credential/netrc: make PERL_PATH configurableDenton Liu, Dec 20, 2019
  8. 2/2 contrib/credential/netrc: work outside a repoDenton Liu, Dec 20, 2019
  9. Jeff KingDec 20, 2019

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.