为什么我不能添加上游git回购?

为什么我不能添加上游git回购?,git,master,upstream-branch,Git,Master,Upstream Branch,我使用了master的fork,master在此期间收到了一些更新,我现在想将这些更新放到我的fork中。所以我所做的是: 已将fork克隆到本地磁盘, 进入目录并使用git remote add upstramhttp://xx.xxx.xxx.xxx:pppp/path/to.git将主回购添加为上游回购。然后,git-fetch-upstream给了我: fatal: 'upstream' does not appear to be a git repository fatal: Coul

我使用了master的fork,master在此期间收到了一些更新,我现在想将这些更新放到我的fork中。所以我所做的是: 已将fork克隆到本地磁盘, 进入目录并使用git remote add upstramhttp://xx.xxx.xxx.xxx:pppp/path/to.git将主回购添加为上游回购。然后,
git-fetch-upstream
给了我:

fatal: 'upstream' 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.
我的磁盘上也有一个主repo的克隆,所以我肯定有读取权限。这里有什么问题


谢谢大家!

很抱歉这样回答,但我无法置评

您是否注意到您的命令是: git远程添加upstram

“上游”不是“上游”

我相信这可能是问题所在


如果您不熟悉该命令,请运行“git remote-v”查看遥控器。

在您的命令中添加名为upstram的遥控器,而不是上游。检查远程设备的名称:git remote show由于我认为您希望将本地git repo与远程repo连接起来,因此我建议您考虑使用:
git remote set url origin[您的远程git repo url]
这是用于更改git remote repo链接引用的

对于新的本地git repo,您应该使用:
git remote add origin[您的远程git repo url]

我希望这对你有帮助