Reputation: 2946
I created my github account and a person added me to a private repository. After adding me i can see the code and forked it. Now when I try to clone the repository after forking from my forked repository i get error. Here is the command i am using
git clone https://github.com/my_username/forked_repo.git
Cloning into 'project'...
remote: Repository not found.
fatal: repository 'https://github.com/my_username/forked_repo.git/' not found
Can someone help me.
Thanks in advance. I am new to git.
Upvotes: 3
Views: 3727
Reputation: 2946
I found the problem, it was the private repo so tried to clone using ssh but the showed same error. The problem was that I did not add the ssh key to the account. The steps are
1) Generated the ssh key
2) Copied the key
3) Pasted the key to the github account.
And it solved the problem.
Upvotes: 2
Reputation: 3110
I'm not logged in with my account and I pulled the repo no problem whether public or private:
$ git status
fatal: Not a git repository (or any of the parent directories): .git
$
$
$ git clone https://github.com/ronisaha/wdCalendar
Cloning into 'wdCalendar'...
remote: Counting objects: 172, done.
remote: Total 172 (delta 0), reused 0 (delta 0)
Receiving objects: 100% (172/172), 246.59 KiB | 0 bytes/s, done.
Resolving deltas: 100% (14/14), done.
Checking connectivity... done
$ git --version
git version 1.8.4
There are a couple important variables to ensure are configured:
@user2413621 I've done the same from my private repo. Doublecheck your config as well.
$ git config --global user.name "my name"
$ git config --global user.email "[email protected]"
$ git remote
origin << If nothing is listed here
$ git remote set-url --add upstream https://gitstuff.com/lalaa
If you have an upstream set correctly. I'd use this tutorial page to make sure you have the command line tools installed properly.
Upvotes: 0