I’ve been using GitHub for a few years, although not for a little while until recently. I see now GitHub is deploying/has deployed 2FA and I have registered. That works. Today, though, I’ve found I cannot push my changes to origin: The requested URL returned error: 403
I’ve investigated further and found I needed a Personal Access Token (PAT). So I generated one for fetching and pulling from the remote. Still getting the 403.
I did some more investigating and found I maybe should be inserting my username as part of the GitHub URL: remote.origin.url=https://ReggieMoto@github.com/ReggieMoto/my-repo.git. Tried that and still getting the 403.
I’m certain this is all tied into the 2FA and the PAT somehow. I have all my credentials and am using them correctly, as far as I can tell. However:
git push origin my-repo-branch
Password for ‘https://ReggieMoto@github.com’:
remote: Permission to ReggieMoto/my-repo.git denied to ReggieMoto.
fatal: unable to access ‘https://github.com/ReggieMoto/my-repo.git/’: The requested URL returned error: 403
So, what’s going wrong?