// This works
git clone https://github.com/foreverjs/forever.git
// This one also works
git clone [email protected]:foreverjs/forever.git
// This one didn't work
git clone git://github.com/foreverjs/forever.git
The error message for the third one is:
Cloning into 'forever'...
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
As far as I know, git clone over SSH or HTTPS is more restricted than git://
protocol. I'm really confused why I got the this error message since git://
protocol doesn't even require for authentication.
Is github only allowed git clone over SSH or HTTPS now or I missed something here?
The gitconfig file in my local computer caused this problem, I found the following two lines in ~/.gitconfig file:
[url "ssh://"]
insteadOf = git://
If I removed these two lines, the git:// protocol will not run over SSH so there will be no more permission issues
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With