git pull master: Error: Repository not found

Viewed 96

I am not able to fetch from a private remote repo, created by myself, to local.

Steps taken:

  1. Generated SSH key. Added it to local SSH agent.
  2. Verify SSH key is added with ssh-add -l -E md5
  3. Add SSH public key through Github interface.
  4. Add SSH URL with git remote set-url {aliasName} {SSH url}
  5. attempt git pull alias on master. also try git fetch alias

In both instances I see this in terminal:

ERROR: Repository not found. fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

I can also confirm the repo is there and has a master branch. What else could be the issue?

cli output

  • Image is incorrect, I meant to say I added its public key to github.
1 Answers

Check first if your key is recognized:

ssh -Tv git@github.com

Then try:

export GIT_SSH_COMMAND='ssh -Tv'

git ls-remote git@github.com:<me>/<myRepo>

That will give you an idea as to where the remote repository access fails.

Related