Convert repo to use token authentication

I’m very confused about updating my linux box to use a personal access token. I’ve generated it, but I have no idea how to update my existing repos to use it. I previously was using username/password which I guess is stored off somewhere - at least, that’s what the warning email says. I’ve looked everywhere but I can only find references to cloning a new repo, not how to convert an existing repo…

Answering my own question: edit the .git/config file in the repo directory and change:

[remote “origin”]
url =