This worked for me .
step 1: git remote -v
step 2: git remote set-url origin https://@github.com/user1/project1.git
step 3: git push -u origin main