I have forked a repo from say user1/repo1 to me/repo1.

Another user has forked the same repo from user1/repo1 to user2/repo1.

I have read access to both repo. I can confirm because i can open the code in browser. I have cloned the forked version of my repo to local.

Now i want to fetch changes from user2/repo1/branchA. user2/repo was not in my remote list. So i added it using

git remote add https://github.com/user2/repo1.git

Verified using

git remote -v

and it shows the remote.Now when i am trying to fetch using

git fetch user2 
git fetch user2 branchA
git fetch user2/branchA

nothing works and i get fatal: repo not found

Also tried cloning the repo directly from link user2/repo1 to local using

git clone https://github.com/user2/repo1.git

but unable to do so. Github wont allow me to create a fork of another fork as i already have forked one version of the repo.

Already looked answers:

https://stackoverflow.com/questions/19971049/what-does-the-git-error-remote-repository-not-found-mean

https://help.github.com/articles/error-repository-not-found/

and various others as i am searching this from 4-5 hours.

  • From what you've described, things should be working. Can you clone user2/repo1 to you local machine? – heavyd Sep 5 '17 at 19:21
  • @heavyd no i am unable to clone it using https , "git clone github.com/user2/repo1.git" – Shubham Singla Sep 5 '17 at 21:04
  • Are you sure the repo exists? Is it a private repo? If so, you would need to authenticate your git client. – heavyd Sep 5 '17 at 22:14
  • yes it exists and its private repo. my git client is authenticated using my account – Shubham Singla Sep 6 '17 at 4:35
  • 1
    You can't use SSH authentication with an http:// repository, you must use either a SSH repository URL or if you must use HTTP you can generate a personal access token. – heavyd Sep 7 '17 at 16:45

Your Answer

 

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

Browse other questions tagged or ask your own question.