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?
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.
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.
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.
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
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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With