This type of question should really be posted on SuperUser instead. But, since it's here, I'll respond here.
I'm assuming you've cloned the repository locally to your machine. If not, do git clone <repo URL>
.
Further, git
can't see private repos unless you have a public ssh key added to your Github account and the corresponding private key is on the machine that you're issuing the git fetch
command.
To generate an ssh key, simply run ssh-keygen
from a terminal in any directory. Accept the default location for the key and supply a passphrase if you wish. Then, copy the contents of the resulting id_rsa.pub
. On Github, go to your "Settings" and go to "SSH and GPG keys". Then click "Add SSH key" and paste the public key contents there. Once you've added it to Github, git
will be able to see your private repos.