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

Credential helpers are no longer invoked in case of having sub-folder parts in a repository URL. Since 2.26.1 version

From
ITIlya Tretyakov <it@it3xl.ru>
Date
Apr 21, 2020, 22:31 UTC
Message-ID
<CAOrRacVviJP3w98-=QpFKYp630cN3gZQYnvAWZXeKqZRk2UDXg@mail.gmail.com>

Credential helpers are no longer invoked in case of having sub-folder parts in a repository URL.

For example, if we have a "/my-proj/" part in the repository URL. The following configuration doesn't invoke a credential helper script in 2.26.1 version of Git but invokes in 2.24.1.2.

[credential "https://git.exaple.com/my-proj/my-repo.git"]
    helper = !'/c/some-path/bash-git-credential-helper/git-cred.sh'
provide  repo_b

A workaround here is to cut the URL to a root view. For example, we can use https://git.exaple.com/ instead of https://git.exaple.com/my-proj/ or https://git.exaple.com/my-proj/my-repo.git as below.

[credential "https://git.exaple.com/"]
    helper = !'/c/some-path/bash-git-credential-helper/git-cred.sh'
provide  repo_b
BTW, the following configuration still works in all Git versions.
[credential "https://foo.bar/my-repo.git"]
    helper = !'/c/some-path/bash-git-credential-helper/git-cred.sh'
provide  repo_a

If this would be possible, please let me know if this could be fixed in future Git versions. Or that I have to adopt my tools, described below, to this new configuration limitation.

JFYI,
I have a tool to synchronize remote Git repositories. This is when two
remote repositories on different servers behave as a single
repository.
 - https://github.com/it3xl/git-repo-sync
I often use this tool with my own bash credential helper on different
automation servers.
 - https://github.com/it3xl/bash-git-credential-helper
And now, my Git-credential helper isn't invoked for repositories that
have additional parts in their URLs.

Of course, I've found a workaround but some people may want to configure more specific credentials for specific URL-s on the same domain.

I am aware of the latest vulnerability discovered in the Git-credential helper functionality. I hope this was the cause of the trouble I described here. ))

Kind Regards, Ilya it3xl.ru

Next: Jeff King
Message 1 of 20 in “Credential helpers are no longer invoked in case of having sub-folder parts in a repository URL. Since 2.26.1 version”
  1. Ilya TretyakovApr 21, 2020
  2. Jeff KingApr 21, 2020
  3. brian m. carlsonApr 22, 2020
  4. Jonathan NiederApr 22, 2020
  5. Jeff KingApr 22, 2020
  6. brian m. carlsonApr 22, 2020
  7. Jeff KingApr 22, 2020
  8. Johannes SchindelinApr 22, 2020
  9. credential: fix matching URLs with multiple levels in pathbrian m. carlson, Apr 22, 2020
  10. Jeff KingApr 22, 2020
  11. brian m. carlsonApr 22, 2020
  12. credential: fix matching URLs with multiple levels in pathbrian m. carlson, Apr 22, 2020
  13. Jeff KingApr 22, 2020
  14. Carlo Marcelo Arenas BelónApr 24, 2020
  15. Junio C HamanoApr 24, 2020
  16. redential: fix matching URLs with multiple levels in pathbrian m. carlson, Apr 25, 2020
  17. Eric SunshineApr 26, 2020
  18. credential: fix matching URLs with multiple levels in pathbrian m. carlson, Apr 26, 2020
  19. credential: fix matching URLs with multiple levels in pathbrian m. carlson, Apr 27, 2020
  20. Junio C HamanoApr 27, 2020

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.