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

git credential cache timeout questions

From
JRJohn Ratliff <john@technoplaza.net>
Date
Feb 19, 2021, 15:46 UTC
Message-ID
<CAP8UukiL0niGSm3o7uYNBzL3FP-UEgfOuq-Tu=fksWJkerT5fg@mail.gmail.com>

I have configured my git to cache my credentials for 12 hours using this section in my .gitconfig

[credential "https://mygithub.example.edu"]
    username = myuser
    helper = cache --timeout 43200

However, the credentials don’t always seem to expire after 12 hours. Sometimes I come back the next morning and the credentials still work. This is generally after leaving at 5:00 PM and coming back in the next day at 9:00 AM, well past the 12 hour timeout.

Is there any way to see the current timeout value? Is it a rolling timeout (i.e. any git action resets the timeout)?

If it happened once or twice, I would assume I just forgot that I did something with git later than I thought. But this happens frequently enough that it’s difficult to accept that as a possibility. It’s not a daily occurrence. My credentials do expire…I just have no idea when they will.

Have I setup my gitconfig section wrong?
CentOS 7. Git 2.24.3.
Thanks.
--John
Next: Jeff King
Message 1 of 3 in “git credential cache timeout questions”
  1. John RatliffFeb 19, 2021
  2. Jeff KingFeb 19, 2021
  3. John RatliffMar 10, 2021

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.