简体   繁体   中英

git: Unable to Clone Private Repositories, Error: Repositories not found

One of my friend added me on his Project on Github, as a collaborator. I am able to see the repo, but when I try to clone with this :

git clone https:/github.com/FriendsUserName/FriendsRepo.git

Gets errors:

remote: Repository not found.
fatal: repository https:/github.com/FriendsUserName/FriendsRepo.git not found

I have setup multiple Github account successfully, from this article - Github for work and play (multiple accounts)

Has anybody got this problem before?

I also tried to fork the repo and then clone. But still getting same error with clone.

The error might occur in the permissions. Check if you have the permission to access.

Your friend must change the permisssion how this article: https://help.github.com/articles/adding-collaborators-to-a-personal-repository/

Also check your ssh access for validate if you re authenticated successfully for rule options ;)

ssh -T git@github.com

A little late to the party, but I got myself in the exact same situation as the asker, so maybe the way I managed to do it will help someone.

The tutorial referred in the question involves creating aliases for the different Github account, eg work.github.com for your work account and me.github.com for your personal one.

So, in this case, the way you should clone your repo should be (assuming it's for your personal account) :

git clone https:/me.github.com/FriendsUserName/FriendsRepo.git

However , even that didn't work for me.

What did work was using the alias together with the ssh url for cloning, ie

git clone git@me.github.com/FriendsUserName/FriendsRepo.git

If this still doesn't work, try to see that you are indeed connecting with the correct account :

ssh -T git@me.github.com

The response to that should be :

Hi <username for personal account here>! You've successfully authenticated, but GitHub does not provide shell access.

Good luck!

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM