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

From: Carlo Marcelo Arenas Belón <[email-masked]>
Date: Tue, 12 May 2020 04:22:01 -0700

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.

what you really meant to use is probably :

  git config credential.helper "store --file=$PWD/git-credentials"

note that using a relative path might not be what you really want, as the
context for when that is run will not be what you expected most likely (ex:
the root of your repository)

> is not working. When using this command, git writes to ~/.git-credentials in the home folder anyway.

note that credential.helper is a multi value setting, so you probably also want
to clear the list first, if your intention was to only use that file and not the
one in ~/.git-credentials.

see `git help gitcredentials` for details

Carlo