skip to Main Content

I’ve created a private repo in Github. But when i perform git fetch, it shows me an error of ‘remote: Repository not found. fatal: repository not found.’ I am a collaborator and an owner of the repo in GitHub. I’m new to GitHub and have no idea what I can do to solve this issue. Any help is appreciated. Thank you

I’ve tried git remote add origin. When I type in `git remote, it shows me ‘origin’.

2

Answers


  1. 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.

    Login or Signup to reply.
  2. Try git remote add origin <URL> per the git remote examples

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search