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

Re: [Bug] git-credential-netrc.perl is not built and is not available in `exec-path`

From
SSiavash <siavash.askari.nasr@gmail.com>
Date
May 21, 2021, 10:26 UTC
Message-ID
<87zgwocri7.fsf@gmail.com>
In-Reply-To
<YKbJdiMNGaJAls4y@google.com>
Hi,
On 2021-05-21 01:11:26 +0430, Jonathan Nieder <jrnieder@gmail.com> wrote:
> I'm missing some basic information:
> - what platform are you running on?
I'm using Arch Linux with Linux v5.12.5-arch1-1.
> - what commands did you use to install Git?
`sudo pacman -S git`
> - what are you trying to do?  That can help us with understanding the
>   problem or giving better advice tailored to the use case.  The netrc
>   credential helper is mostly meant as a demo, since libcurl supports
>   ~/.netrc on its own already.

I wanted to use `git-credential-netrc.perl` to use `.authinfo.gpg` as git credential. The `gitcredentials` manual said use: `git config --global credential-helper foo` for using credential helpers. It also mentioned that `git credential-` gets prepended to the external helpers. So I expected: `git config --global credential-helper 'netrc'` to work.

I can use it as a helper if I use an absolute path: '/usr/share/git/credential/netrc/git-credential-netrc.perl'

After looking at the `PKGBUILD` file in Arch Linux's git repository, I found out that they are not making "netrc". https://github.com/archlinux/svntogit-packages/blob/4864e39da0bc99e373f3cb728272a93d66b58cd6/trunk/PKGBUILD#L63-L64

So this is not a bug. As Jeff King mentioned as well. I should have checked the `PKGBUILD`.

The output of `git --exec-path` is `/usr/lib/git-core`. And there are other helpers there(made by Arch Linux). This is the output of `lsd /usr/lib/git-core/ | rg credential`: git-credential git-credential-cache git-credential-cache--daemon git-credential-gnome-keyring git-credential-libsecret git-credential-store

I expected the third-party helpers to be in the output of `git help -a` as mentioned in the manual. They are not in the `PATH`, but they are in git's `exec-path`. So shouldn't they be printed in the help output?

Previous: Jonathan NiederNext: brian m. carlson
Message 3 of 17 in “[Bug] git-credential-netrc.perl is not built and is not available in `exec-path`”
  1. SiavashMay 20, 2021
  2. Jonathan NiederMay 20, 2021
  3. SiavashMay 21, 2021
  4. brian m. carlsonMay 21, 2021
  5. Jeff KingMay 21, 2021
  6. brian m. carlsonMay 21, 2021
  7. Jeff KingMay 23, 2021
  8. Felipe ContrerasMay 24, 2021
  9. Renaming "non-contrib" things out of contrib/* (was "Re: [Bug] git-credential-netrc.perl[...]")Ævar Arnfjörð Bjarmason, May 24, 2021
  10. Felipe ContrerasMay 24, 2021
  11. Ævar Arnfjörð BjarmasonMay 24, 2021
  12. Felipe ContrerasMay 25, 2021
  13. Junio C HamanoMay 25, 2021
  14. Bagas SanjayaMay 25, 2021
  15. Felipe ContrerasMay 25, 2021
  16. Felipe ContrerasMay 25, 2021
  17. Jeff KingMay 21, 2021

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.