Git 推送 origin master 问题

Git push origin master issue

我有一台 mac,每当我尝试输入

git push origin master

我收到这个错误

fatal: 'origin' does not appear to be a git repository
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

我也不想切换到 ssh。

谢谢

您没有添加源服务器:

git remote add origin https://domain.com/user/repo.git

您可以使用 git remote -v:

查看您远程添加的服务器
git remote -v
origin  https://domain.com/user/repo.git (fetch)
origin  https://domain.com/user/repo.git (push)

您可以前往 this site 阅读更多内容。