Ssh problems mac

I added my ssh key on Mac, tested and got the successfully authenticated message as expected. When I try to “git push origin main” it asks for username and password. I enter my GitHub username and password and get the following error message… remote: Support for password authentication was removed on August 13, 2021. Please use a personal access token instead.

remote: Please see Token authentication requirements for Git operations | The GitHub Blog for more information.

fatal: Authentication failed for ‘Vikingcoder702/git_test_2 · GitHub

I am trying to go through the curriculum on The Odin Project to learn git and github but Im stuck now and cannot figure out what is wrong or why it will not let me push and wont take my username and password. Any help would be amazing. It should be noted that it allowed me to clone the repository to my machine, modify, stage and commit, but wont allow me to push.

@Vikingcoder702 make sure you have used the Git SSH URL format and not https for the defintion of your remote origin in your local gitconfig

This link may help
changing-a-remote-repositorys-url