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

Fwd: Git credentials not working

From
Dimitri Kopriwa <d.kopriwa@gmail.com>
Date
Oct 3, 2018, 14:06 UTC
Message-ID
<f4f7bd2c-4c48-e749-4df1-ddf05896b337@gmail.com>
In-Reply-To
<a1ceb967-6020-6074-f504-c684242c79ab@gmail.com>
Dear Git list,

I have tried to used git credentials within Gitlab-CI runners. I have 4 instance of GitLab and discovered a weird bug with Git credentials when use within a CI process.

Please note before all that the time spend allowed me multiple time to check that my credentials are valid for the repository. And calling git fetch --tags with the full remote url that include the credentials always succeeded.

Tested with Git 2.11, 2.19

Git credentials in ~/.git-credentials and ~/.config/git/credentials are being removed by git upon reading.

This happen randomly accross my CI runner, and change that make them work on not related.

{ Error: Command failed: git fetch --tags https://git.example.com/example/some-project.git 18:25:52.554903 git.c:415               trace: built-in: git fetch --tags https://git.example.com/example/some-project.git 18:25:52.555234 run-command.c:637       trace: run_command: GIT_DIR=.git git-remote-https https://git.example.com/example/some-project.git https://git.example.com/example/some-project.git 18:25:52.692741 run-command.c:637       trace: run_command: 'git credential-store get' 18:25:52.697314 git.c:659               trace: exec: git-credential-store get 18:25:52.697372 run-command.c:637       trace: run_command: git-credential-store get 18:25:52.936024 run-command.c:637       trace: run_command: 'git credential-store erase' 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/'

See the full question here: https://stackoverflow.com/questions/52614467/why-does-git-credential-store-call-git-credential-erase-and-make-my-credential-f

Can you please help me found why is git credential-store erase called ?
Best regards,
Next: Christian Couder
Message 1 of 10 in “Fwd: Git credentials not working”
  1. Dimitri KopriwaOct 3, 2018
  2. Christian CouderOct 3, 2018
  3. Dimitri KopriwaOct 3, 2018
  4. Jeff KingOct 3, 2018
  5. Dimitri KopriwaOct 3, 2018
  6. Jeff KingOct 3, 2018
  7. Dimitri KopriwaOct 3, 2018
  8. Bryan TurnerOct 3, 2018
  9. Jeff KingOct 3, 2018
  10. Dimitri KopriwaOct 3, 2018

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.