Git本地提交到GitHub遇到错误

第一次用Git,按CSDN上面找的教程想要远程提交本地到GitHub的时候报错了,翻了一遍GitHub上面的手册也没找到解决方案。
$ git remote add origin git@github.com:*/*.git
git branch -M main
git push -u origin main

error: remote origin already exists.
fatal: unable to access 'https://github.com/*/*.git/': Failed to connect to github.com port 443 after 2084 ms: Connection refused
想请教一下这是什么问题,要如何解决(输入是复制GitHub创建空存储库页面里面的内容,星号只是为了隐去用户名和库名)