From: Jeff King <peff@peff.net>
To: Dimitri Kopriwa <d.kopriwa@gmail.com>
Cc: git-security@googlegroups.com, git@vger.kernel.org
Subject: Re: Fwd: Git credentials not working
Date: Wed, 3 Oct 2018 13:11:05 -0400 [thread overview]
Message-ID: <20181003171104.GA12200@sigill.intra.peff.net> (raw)
In-Reply-To: <f4f7bd2c-4c48-e749-4df1-ddf05896b337@gmail.com>
On Wed, Oct 03, 2018 at 09:06:38PM +0700, Dimitri Kopriwa wrote:
> 18:25:52.940307 git.c:659 trace: exec: git-credential-store erase
> 18:25:52.940365 run-command.c:637 trace: run_command: git-credential-store erase
> remote: HTTP Basic: Access denied
> fatal: Authentication failed for
> 'https://git.example.com/example/some-project.git/'
> [...]
>
> Can you please help me found why is git credential-store erase called ?
This is expected. We tried to use a credential that was rejected by the
server, so we told all of the helpers it was invalid. You can try
running GIT_TRACE_CURL=1 to see the HTTP conversation. There will be an
HTTP 401 with the authentication failure, though it may not tell you
anything more useful than that.
git-credential-store is meant to be used interactively, to insert and
erase credentials as they're grabbed from the terminal.
It sounds more like you want to just have a stored credential that you
try to use. You could do that with a custom helper. E.g., something like
this in your ~/.gitconfig:
[credential "https://example.com"]
helper = "!f() { test $1 = get && echo password=$(cat /path/with/password); }; f"
-Peff
next prev parent reply other threads:[~2018-10-03 17:11 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <a1ceb967-6020-6074-f504-c684242c79ab@gmail.com>
2018-10-03 14:06 ` Fwd: Git credentials not working Dimitri Kopriwa
2018-10-03 16:03 ` Christian Couder
2018-10-03 17:29 ` Dimitri Kopriwa
2018-10-03 17:11 ` Jeff King [this message]
2018-10-03 18:12 ` Fwd: " Dimitri Kopriwa
2018-10-03 18:24 ` Jeff King
2018-10-03 19:34 ` Dimitri Kopriwa
2018-10-03 20:03 ` Bryan Turner
2018-10-03 20:43 ` Jeff King
2018-10-03 21:35 ` Dimitri Kopriwa
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=20181003171104.GA12200@sigill.intra.peff.net \
--to=peff@peff.net \
--cc=d.kopriwa@gmail.com \
--cc=git-security@googlegroups.com \
--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).