When I do
git push --set-upstream origin main
It returned
fatal: unable to access 'https://github.com/RozuRoseMary/my-app.git~/': The requested URL returned error: 400
I use git version 2.35.1.windows.2
I had a similar problem. This may be due to the use of an SSH key.
Try deleting the link to the remote repository and add a new link to it using SSH
git remote rm origin
git remote add origin [email protected]:username/project.git
~/in .git/config for the origin upstream.