致命:远程错误:找不到存储库octocat / myapp [英] fatal: remote error: Could not find Repository octocat/myapp
问题描述
我第一次使用Git,并按照 GitHub的说明。
我能够在本地计算机上克隆我的分支,但运行这些命令时出现错误:
$ git remote add upstream git://github.com/octocat/myappname.git
$ git fetch upstream
fatal:remote错误:无法找到存储库octocat / myappname
如何解决此错误并获取项目? / p>
它看起来并不像您从文档中直接复制/粘贴,但可以肯定的是,您的环境可能会不能正确设置。如果您正在分叉的回购商店名为 testproject ,那么您的用户名是我,他们的用户名是他们:
你应该分叉,然后克隆你的回购。您的回购地址是ssh://git@github.com/me/testproject 注意ssh协议
然后,您应该添加<他们是回购作为上游回购(这是git远程添加上游)。 Github提供了一个链接,你可以在那里复制,但如果可能的话,你应该使用git协议(参见VonC有关git,http和防火墙的说明)。添加upsteam回购的命令是 git remote add upstream git://github.com/they/testproject
请注意,上游是任意的。您可以将其命名为上游或您想要的任何其他名称。此外,请确保正确获取/ they和/ testproject,因为如果该用户帐户中不存在repo,则会导致错误。 I am using Git for the first time and just forked one open source project following GitHub's instructions. I am able to clone my fork on local computer but I get an error when running these commands:
$git remote add upstream git://github.com/octocat/myappname.git
$ git fetch upstream
git fetch
gives me this error:
fatal: remote error: Could not find Repository octocat/myappname
How can I resolve this error and fetch the project?
It doesn't look like you did a straight copy/paste from the docs, but just to be sure, your environment might not be set up correctly. If the repo you're forking is called testproject , your username is me and their username is they :
You should have forked and then cloned your repo. Your repo's address is ssh://git@github.com/me/testproject notice the ssh protocol
Then, you should have added they's repo as an upstream repo (that's the git remote add upstream). Github provides a link you can copy there, but you should use the git protocol if possible (see VonC's note about git, http and firewall). The command to add the upsteam repo is git remote add upstream git://github.com/they/testproject
Note that upstream is arbitrary. You can name it upstream or anything else you want. Also, make sure to get the /they and /testproject right as that will cause errors if the repo doesn't exist in that user's account
这篇关于致命:远程错误:找不到存储库octocat / myapp的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!