Everything seemed to be working until the last part of the lesson:
git push -u origin main
When I get this error:
remote: Permission to DominicBennett/git_practice.git denied to DominicBennett.
fatal: unable to access 'https://github.com/DominicBennett/git_practice.git/': The requested URL returned error: 403
I have created a fine grained access token, used it to login to github using gh auth, I’m not sure why I can’t push to the repository. Any help greatly apprecaited.
They’re short enough that they can be done quickly, so I feel like it’s worth it to just go through them. If you feel like you did most of the steps but missed maybe a detail on some, you can try posting here again. Like for example if you ran a command and you don’t know what it does or how to verify it ran correctly.
I haven’t seen that tutorial lately, so I can’t comment on it (i’m just another user).
I do know that SSH is the recommended way to authenticate to GitHub (maybe in my memory they pivoted from simple user/password a little bit ago).
SSH protocol is basically a cryptographically more secure way to connect. It involves private keys and shared public keys (if you wonder why you’re generated what looks like gibberish text). It’s interesting to look into on its own right.
Hello again. I have tried your suggestions, and they worked. My initial problem seems to have been getting the ‘granulated token’ and HTTPS working as suggested in the article.
However the SSH method you described worked first time. So now I can push to github via ssh, which at least gets me working again.
No doubt I may have to revisit the HTTPS/granulated token setup in the future, but is seems incredibly unfriendly and the Codecademy lesson just points you to the github docs, which were voluminous and not so clear to a newbie.
Thanks for the suggestion. I did look at your link, and also the links supplied by another user which you can read later in this thread, and was able to set up with SSH.