I don't know how to validate user @r2evans' comment above, but indeed it worked!
I already had a PAT token set, so I followed the steps in https://happygitwithr.com/credential-caching.html#credential-caching, starting at 10.2.1.1
install.packages("gitcreds")
library(gitcreds)
gitcreds_set()
I had to enter my computer password, then it showed my current identification parameters.
Enter 2 to replace the password/token, and voilà!
Thanks for the easy fix @r2evans.
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…