Use url https://<username>:<personal-access-token>@github.com/<username>/<repository>.git

For example:

git clone https://johndoe:ghp_abc123xyz@github.com/johndoe/my-repo.git
git remote set-url origin https://johndoe:ghp_abc123xyz@github.com/johndoe/my-repo.git