Re: git-credential-store does not work with a file

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Carlo Marcelo Arenas Belón <carenas@xxxxxxxxx> writes:

> On Tue, May 12, 2020 at 12:40:10AM +0000, David Moseler wrote:
>> Hi,
>> 
>> I'm using git version 2.17.1. Providing a file to git-credential-store, such as in
>> 
>> git config credential.helper store --file='./git-credentials'
>
> your quoting is off, so you are passing to config only the value 'store' while
> the rest is ignored.

Actually it is worse than that.  If it were "the rest is ignored",
we can fix it to give an error.  But the problem is, the rest is
*not* ignored.  It is used as an argument with a meaning that the
user did not expect it to have.

The above asks "we want to update the value of credential.helper
variable(s) and set 'store' as its value, but we want to do so only
for the entries whose current value match the regular expression
given as the last argument".  

It is unlikely that a credential.helper variable defined with the
value "--file=./git-credentials", so the command silently succeeds
after replacing 0 entries.  

The same issue exists with "--replace-all", "--unset" and other
forms of "git config" that take an optional value_regex.

This is now totally offtopic for a thread about credential-store,
but we probably should fix the command line UI for this feature.

Perhaps

 1) Teach all the forms of "git config" that currently takes an
    optional value_regex to accept "--value-regexp=regex" option.
    It will be an error to give both --value-regexp parameter and
    the optional "value_regex" argument.  Wait for several releases.

 2) Update these forms to warn when the current "optional"
    value_regex syntax is used, and tell users to explicitly use the
    "--value-regexp=regex" option.  Wait for several releases.

 3) Remove support for the "optional" value_regex syntax and error
    out when it is used.

over a few years.




[Index of Archives]     [Linux Kernel Development]     [Gcc Help]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [V4L]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]     [Fedora Users]

  Powered by Linux