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

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
Previous: David MoselerNext: Junio C Hamano
Message 2 of 3 in “git-credential-store does not work with a file”
  1. David MoselerMay 12, 2020
  2. Carlo Marcelo Arenas BelónMay 12, 2020
  3. Junio C HamanoMay 13, 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.