{"thread":{"id":"62618","subject":"git credentials store: removed line when token expired","startedAt":"2024-12-09T16:04:03Z","lastAt":"2024-12-10T02:46:06Z","messageCount":2,"participants":["Sergey Ivanov","brian m. carlson"],"isPatch":false,"patchVersion":null,"patchTotal":null},"messages":[{"id":"508868","messageId":"CAJCbrz5_8nCWSsb2PYGmQoYDKE2vH5kURx9ePabPjosbJsMH_g@mail.gmail.com","threadId":"62618","inReplyTo":null,"subject":"git credentials store: removed line when token expired","fromName":"Sergey Ivanov","fromEmail":"icegood1980@gmail.com","sentAt":"2024-12-09T16:03:49Z","receivedAt":"2024-12-09T16:04:03Z","isPatch":false,"sender":{"key":"icegood1980@gmail.com","avatar":null},"body":"see attached\n\n-- \nKind regards,\nSergey Ivanov\n\n\nThank you for filling out a Git bug report!\nPlease answer the following questions to help us understand your issue.\n\nWhat did you do before the bug happened? (Steps to reproduce your issue)\n1) My remote token to git repo was expired\n2) I have git config --global credential.helper\nstore\nand had line with given url added here\nWhat did you expect to happen? (Expected behavior)\nGit will say that token is not working\nand will NOT touch credentials file.\n\nWhat happened instead? (Actual behavior)\nGit removes whole urk from git-credentials\nand says 'not token'\n\nWhat's different between what you expected and what actually happened?\nI want manually change token only, noe whole URK format of which i\nconstantly forgetting\n\nAnything else you want to add:\n\nPlease review the rest of the bug report below.\nYou can delete any lines you don't wish to share.\n\n\n[System Info]\ngit version:\ngit version 2.34.1\ncpu: x86_64\nno commit associated with this build\nsizeof-long: 8\nsizeof-size_t: 8\nshell-path: /bin/sh\nuname: Linux 6.8.0-49-generic #49~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov  6 17:42:15 UTC 2 x86_64\ncompiler info: gnuc: 11.4\nlibc info: glibc: 2.35\n$SHELL (typically, interactive shell): /bin/bash\n\n\n[Enabled Hooks]\npre-auto-gc\n"},{"id":"508902","messageId":"Z1erbLD33V7ENGGq@tapette.crustytoothpaste.net","threadId":"62618","inReplyTo":"CAJCbrz5_8nCWSsb2PYGmQoYDKE2vH5kURx9ePabPjosbJsMH_g@mail.gmail.com","subject":"Re: git credentials store: removed line when token expired","fromName":"brian m. carlson","fromEmail":"sandals@crustytoothpaste.net","sentAt":"2024-12-10T02:46:04Z","receivedAt":"2024-12-10T02:46:06Z","isPatch":false,"sender":{"key":"sandals@crustytoothpaste.net","avatar":"https://avatars.githubusercontent.com/u/497054?v=4"},"body":"On 2024-12-09 at 16:03:49, Sergey Ivanov wrote:\n> Thank you for filling out a Git bug report!\n> Please answer the following questions to help us understand your issue.\n> \n> What did you do before the bug happened? (Steps to reproduce your issue)\n> 1) My remote token to git repo was expired\n> 2) I have git config --global credential.helper\n> store\n> and had line with given url added here\n> What did you expect to happen? (Expected behavior)\n> Git will say that token is not working\n> and will NOT touch credentials file.\n\nWhen a credential is not valid, Git invokes the helper with the `erase`\nargument to delete the bad credential.  That's documented in\ngit-credential(1) and gitcredentials(7).\n\nIf Git didn't do that, then when it needed to prompt for a new\ncredential, it would get exactly the same credential before, and it\nwouldn't work.  Because most credential helpers store data in opaque\nstores (like the system password manager), it would be nearly impossible\nfor the average user to understand how to clear the credential if Git\ndidn't do it itself.\n\n> What happened instead? (Actual behavior)\n> Git removes whole urk from git-credentials\n> and says 'not token'\n\nThis file is entirely managed by the credential helper.  I know it seems\nlike a plain text file you can edit by hand, and you can, but it's an\nimplementation detail that the data is stored that way.  It's not\ndesigned as a general-purpose URL store or user-owned config file that\nthe credential helper will never edit.\n\n> What's different between what you expected and what actually happened?\n> I want manually change token only, noe whole URK format of which i\n> constantly forgetting\n\nI'm very sorry that this didn't end up working out how you expected.  I\nthink your URL may be available via `git remote -v` in your repository,\nwhich hopefully should let you recover the URL if it was associated with\na remote.\n-- \nbrian m. carlson (they/them or he/him)\nToronto, Ontario, CA\n"}]}