Re: git-credential-store does not work with a file
- From
Carlo Marcelo Arenas Belón <carenas@gmail.com>
- Date
- May 12, 2020, 11:22 UTC
- Message-ID
- <20200512112201.GA10049@Carlos-MBP>
- In-Reply-To
- <uBc-Htk5XJFPF28aiZsQUIowfd66Ay2NiCyVbxkWpD77ugn3k4LBLse-jm0Jf4HpAKMWt4chuRAbxskeczZpj_pEnUaX_XOrmhfYksCeVLw=@protonmail.com>
On Tue, May 12, 2020 at 12:40:10AM +0000, David Moseler wrote:
Show 5 quoted lines
> 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