I have once already done a local git with the CLI but with a different account. For reference I used this video: https://www.youtube.com/watch?v=DVRQoVRzMIY&ab_channel=TechWithTim
That account works, but I wanted to create a new one. After that, I successfully created the new one and typed:
git config --global user.name "Your Name"
and
git config --global user.email "youremail@yourdomain.com"
When I did this for my first account I was able to
git push -u origin main
without having any problems, however, now that I have done it again for my second account I received this error:
remote: Permission to lunAr-creator/learning_python.git denied to Slow-Scallion4183. fatal: unable to access 'https://github.com/lunAr-creator/learning_python.git/': The requested URL returned error: 403
Slow-Scallion3184 is my first account, lunAr-creator is my second
Is there a way I can fix this? Any help would be greatly appreciated!
Edit: After I tried what was suggested in the comments I just received this error:
git@github.com: Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.