Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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

Tags:

git

github

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?

like image 308
SRC Avatar asked Sep 30 '11 14:09

SRC


People also ask

How do I fix remote repository not found?

Fix 5 - Git - remote: Repository not found Just run the git remote update command which updates the local repo with the remote repo and its credentials. If this command is executed without any issues then your issue will be resolved.

Why am I getting repository not found?

Error: Repository not found. If you see this error when cloning a repository, it means that the repository does not exist or you do not have permission to access it.

How do I resolve a fatal error in git?

A Git command needs to be run on a specific repository, so this error typically occurs when a Git command is run in a directory that Git doesn't know about. In these cases, the fix is to make sure that you are both working in the correct folder and that you set up your repository right.


3 Answers

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://[email protected]/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

like image 180
brycemcd Avatar answered Oct 20 '22 00:10

brycemcd


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?

like image 44
dunni Avatar answered Oct 19 '22 23:10

dunni


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

git remote add upstream http://github.com/octocat/myappname
like image 35
VonC Avatar answered Oct 20 '22 01:10

VonC