开发者

fatal: remote error: Could not find Repository octocat/myapp

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 开发者_如何学Pythonan 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


You should put your username instead of octocat. The account octocat just has the repositories Spoon-Knife and Hello-World and is an testaccount from the company Github.

Or did you fork the Spoon-Knife repository from octocat?


Try using http address (or https address if you need to also push)

git remote add upstream http://github.com/octocat/myappname
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜