Storing Git (hub/lab) credentials in a shiny app for persistent storage

I have a shiny app which I would like to be able to push files to a git repository (either on gitlab or github). I've followed the instructions on persistent data storage here
And quickly and easily set up adding folders to dropbox

token <- drop_auth()
saveRDS(token, "droptoken.rds")
token <- readRDS("droptoken.rds")
drop_acc(dtoken = token)

However, after hours and finally weeks of searching, I can't work out how to easily stash git credentials into a file that I can deploy with my shiny app. I can generate personal access tokens, but I can't store them correctly for later access