I had posted this in a different forum last week but gotten no response so I am posting it here:
Using RStudio on Ubuntu, I am asked to input my GitHub token regularly (it looks like it resets every 60 minutes) even though it is stored correctly. That is when I check .git-credentials and with gitcreds::gitcreds_set()
what credentials are stored, it is the right username and token.