git user/pass pop-ups when using git in Terminal window

Indeed! Thanks, that works. I have run (in Terminal) (or editing ~/.gitconfig):

git config --global credential.helper 'cache --timeout=10000000'

I varied the number from 1 to 20 and confirmed that at 1 the pop-up comes up every time. At 20, I had to wait 20 seconds between git push commands to make it pop-up.

Seems like the server system that I am on doesn't have this set at --system level, so the default would be 15m. This explains why it felt random: some students were running commands within that 15m window (and resetting the counter) but others were not (and therefore the counter was expiring).

Would be great to add this to the pop-up window:

Reduce frequency of this pop-up by setting the credential.helper  gitconfig var using `git config --global credential.helper 'cache --timeout=LENGTH_IN_SECONDS'`

However I think that text is defined in the askpass utility, which is why it is also hard to make that text reflect the need for a PAT and not GitHub password, as mentioned here https://forum.posit.co/t/pushing-to-github-requests-password-but-actually-needs-personal-access-token-pat/156610

1 Like