'Why am I not able to clone a private repository in which I am a collaborator
I am a collaborator in one the private github repository. I am able to fork it but when I try to clone it onto my system, it shows a pop up box asking for credentials and even if I enter correct credentials I can't login.
Is it just me or github actually doesn't allow cloning of private repo even if I am a collaborator in it?
Solution 1:[1]
You can clone it over HTTPS
git clone https://github.com/privateRepo/privateRepo.git
The prompt will ask for your username password/Authentication Token.
or
git clone https://username:[email protected]/user/repo
Note :- Support for password authentication was removed [link]. Please use a personal access token instead of password if it does not work.
Solution 2:[2]
If you can fork it, you should be albe to clone it.
even if I enter correct credential
Make sure to use a PAT (Personal Access Token) as your password, instead of your actual GitHub account password.
This is because of "Token authentication requirements for Git operations" from Dec. 2020.
Sources
This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.
Source: Stack Overflow
| Solution | Source |
|---|---|
| Solution 1 | |
| Solution 2 | VonC |
