git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dimitri Kopriwa <d.kopriwa@gmail.com>
To: Christian Couder <christian.couder@gmail.com>
Cc: git <git@vger.kernel.org>
Subject: Re: Git credentials not working
Date: Thu, 4 Oct 2018 00:29:46 +0700	[thread overview]
Message-ID: <d4f5551f-89d2-d63e-49da-dd80f22ea9ce@gmail.com> (raw)
In-Reply-To: <CAP8UFD3LEYd7RytZU_-wVcDosH+6VSdM2j3NUcnR0aQc8QfoQg@mail.gmail.com>


On 10/3/18 11:03 PM, Christian Couder wrote:
> (removing git-security from CC)
>
> On Wed, Oct 3, 2018 at 4:09 PM Dimitri Kopriwa <d.kopriwa@gmail.com> wrote:
>
>> Git credentials in ~/.git-credentials and ~/.config/git/credentials are
>> being removed by git upon reading.
> https://git-scm.com/docs/git-credential says:
>
> "If the action is reject, git-credential will send the description to
> any configured credential helpers, which may erase any stored
> credential matching the description."
>
> So maybe this is expected.
I am using this script to create my credential file, how am I supposed 
to do in a non tty environment? Is there a prefered way?
>
> Another possibility is that your .gitlab-ci.yml might launch scripts
> writing into those files, like the before_script.sh script that is
> described on:
>
> https://stackoverflow.com/questions/50553049/is-it-possible-to-do-a-git-push-within-a-gitlab-ci-without-ssh
>
> Could you also check which credential helper and which options are
> used? For example with commands like:
>
> $ git config -l --show-origin | grep -i cred
> $ git config -l --show-origin | grep -i http
> $ git config -l --show-origin | grep -i askpass
> $ env | grep -i askpass
  * branch            HEAD       -> FETCH_HEAD
17:15:36.175966 run-command.c:637       trace: run_command: git gc --auto
17:15:36.177688 git.c:415               trace: built-in: git gc --auto
^[[32;1m$ git config -l --show-origin | grep -i cred^[[0;m
17:15:36.180191 git.c:415               trace: built-in: git config -l 
--show-origin
file:/root/.gitconfig    credential.helper=store
file:.git/config    credential.helper=store
^[[32;1m$ git config -l --show-origin | grep -i http^[[0;m
17:15:36.182768 git.c:415               trace: built-in: git config -l 
--show-origin
file:.git/config 
remote.origin.url=https://git.example.com/example/sample-project.git
^[[32;1m$ git config -l --show-origin | grep -i askpass || echo nothing 
to do^[[0;m
17:15:36.185306 git.c:415               trace: built-in: git config -l 
--show-origin
nothing to do
^[[32;1m$ env | grep -i askpass || echo nothing to do^[[0;m
nothing to do

  reply	other threads:[~2018-10-03 17:29 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 [this message]
2018-10-03 17:11   ` Fwd: " Jeff King
2018-10-03 18:12     ` 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=d4f5551f-89d2-d63e-49da-dd80f22ea9ce@gmail.com \
    --to=d.kopriwa@gmail.com \
    --cc=christian.couder@gmail.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).