git@vger.kernel.org mailing list mirror (one of many)
 help / color / mirror / code / Atom feed
From: Dimitri Kopriwa <d.kopriwa@gmail.com>
To: Jeff King <peff@peff.net>
Cc: git@vger.kernel.org
Subject: Re: Fwd: Git credentials not working
Date: Thu, 4 Oct 2018 04:35:15 +0700	[thread overview]
Message-ID: <9cdc6dc8-a897-471f-a7e3-83cdfdf86fac@gmail.com> (raw)
In-Reply-To: <20181003204312.GC20709@sigill.intra.peff.net>

Thanks everyone.

All your answers helped. I found out that the issue was not related to git.

I am using semantic-release to perform a release, apparently 
git-credentials is not working with semantic-release.

I did also setup the double authentication and every fix applied on 
git-credentials were simply useless.

Read more here : 
https://github.com/semantic-release/semantic-release/issues/941#issuecomment-426691824

Thanks a lot for your help and git is the best software ever made thanks!

Dimitri Kopriwa


On 10/4/18 3:43 AM, Jeff King wrote:
> On Thu, Oct 04, 2018 at 02:34:17AM +0700, Dimitri Kopriwa wrote:
>
>> I have replaced the way I fill the git credentials store, I have verify
>> ~/.git-credentials and information are there, the ~/.gitconfig look fine
>> too.
>>
>> I still have 401 error when reading from that file.
>>
>> This is the paste log : https://paste.gnome.org/pmntlkdw0
>>
>> Now that I use git approve, I dont think that I need a custom helper.
>>
>> Any idea why I still can't log in using git-credential?
> Looking at your pastebin, it looks like the server sometimes takes it
> and sometimes not. E.g., piping the log through:
>
>    egrep '(Send|Recv) header:' |
>    perl -lpe 's/^.*?(=>|<=) //'
>
> I see:
>
>    Send header: GET /example-keys/sample-project.git/info/refs?service=git-upload-pack HTTP/1.1
>    Send header: User-Agent: git/2.19.0
>    ...
>    Recv header: HTTP/1.1 401 Unauthorized
>    Recv header: WWW-Authenticate: Basic realm="GitLab"
>    ...
>    Send header: GET /example-keys/sample-project.git/info/refs?service=git-upload-pack HTTP/1.1
>    Send header: Authorization: Basic <redacted>
>    Send header: User-Agent: git/2.19.0
>    ...
>    Recv header: HTTP/1.1 200 OK
>
> So that works. But then later we get:
>
>    Send header: GET /example-keys/sample-project.git/info/refs?service=git-upload-pack HTTP/1.1
>    Send header: User-Agent: git/2.19.0
>    ...
>    Recv header: HTTP/1.1 401 Unauthorized
>    Recv header: WWW-Authenticate: Basic realm="GitLab"
>    ...
>    Send header: GET /example-keys/sample-project.git/info/refs?service=git-upload-pack HTTP/1.1
>    Send header: Authorization: Basic <redacted>
>    Send header: User-Agent: git/2.19.0
>    ...
>    Recv header: HTTP/1.1 401 Unauthorized
>
> And then that causes credential-store to delete the non-working entry,
> after which all of them must fail (because you have no working
> credential, and presumably no terminal to prompt the user).
>
> I have no idea why the same request would sometimes be allowed and
> sometimes not. It's possible the <redacted> data is different in those
> two times, but I don't know why that would be. It's also possible you're
> hitting different load-balancing servers that behave differently.
>
> -Peff

      reply	other threads:[~2018-10-03 21:35 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   ` 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 [this message]

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

  List information: http://vger.kernel.org/majordomo-info.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=9cdc6dc8-a897-471f-a7e3-83cdfdf86fac@gmail.com \
    --to=d.kopriwa@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=peff@peff.net \
    /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.
Code repositories for project(s) associated with this public inbox

	https://80x24.org/mirrors/git.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).