git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Ilya Tretyakov <it@it3xl.ru>
To: git@vger.kernel.org
Subject: Credential helpers are no longer invoked in case of having sub-folder parts in a repository URL. Since 2.26.1 version
Date: Wed, 22 Apr 2020 01:31:46 +0300	[thread overview]
Message-ID: <CAOrRacVviJP3w98-=QpFKYp630cN3gZQYnvAWZXeKqZRk2UDXg@mail.gmail.com> (raw)

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

             reply	other threads:[~2020-04-21 22:33 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-04-21 22:31 Ilya Tretyakov [this message]
2020-04-21 22:58 ` Credential helpers are no longer invoked in case of having sub-folder parts in a repository URL. Since 2.26.1 version Jeff King
2020-04-22  1:09   ` brian m. carlson
2020-04-22  1:28     ` Jonathan Nieder
2020-04-22  1:36       ` Jeff King
2020-04-22  2:20       ` brian m. carlson
2020-04-22  4:06         ` Jeff King
2020-04-22 19:20           ` Johannes Schindelin
2020-04-22  1:23   ` [PATCH] credential: fix matching URLs with multiple levels in path brian m. carlson
2020-04-22  4:16     ` Jeff King
2020-04-22 18:45       ` brian m. carlson
2020-04-22 19:51   ` [PATCH v2] " brian m. carlson
2020-04-22 20:04     ` Jeff King
2020-04-24  4:50     ` Carlo Marcelo Arenas Belón
2020-04-24 20:20       ` Junio C Hamano
2020-04-25 21:32   ` [PATCH v3] redential: " brian m. carlson
2020-04-26  1:51     ` Eric Sunshine
2020-04-26 17:26   ` [PATCH v4] credential: " brian m. carlson
2020-04-27  1:18   ` [PATCH v5] " brian m. carlson
2020-04-27 18:44     ` Junio C Hamano

Reply instructions:

You may reply publicly 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

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAOrRacVviJP3w98-=QpFKYp630cN3gZQYnvAWZXeKqZRk2UDXg@mail.gmail.com' \
    --to=it@it3xl.ru \
    --cc=git@vger.kernel.org \
    /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
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).