nivanka
nivanka

Reputation: 1372

How can I resolve a permission denied error with git-remote-https?

I'm having trouble trying to clone a GitHub repository with the following command:

git clone https://[email protected]/MYPROJECT.git

When I run it, I get this error:

fatal: cannot exec 'git-remote-https': Permission denied

How can I resolve it?

Upvotes: 4

Views: 21414

Answers (3)

Lyle Z
Lyle Z

Reputation: 1363

Disabling the antivirus resolved this issue for me.

Upvotes: -1

VonC
VonC

Reputation: 1324258

Try:

 git clone https://github.com/username/MYPROJECT

Which should be the correct http address (instead of trying to access github through an ssh session) for a public repo.
It will take advantage of their support for smart http.

 git clone https://[email protected]/username/project.git

is for private repo (as explained here), which should work if your id is right and your public ssh key correctly updated on your GitHub account.
(Note: your original address was missing the /username/ part)

The OP reports:

my RSA keys were not used when authenticating, I did a ssh-add and added them.
After that it worked figured it out by running ssh -vT [email protected] in my terminal

Upvotes: 4

Grad van Horck
Grad van Horck

Reputation: 4506

Every GitHub project has a 'clone url' widget to help you select the URL you need. Select it's access method (GIT/HTTP/etc.) and copy the url.

If it's your own project (/ have write access to the project):

git clone [email protected]:username/project.git

or

git clone https://[email protected]/username/project.git

If you want a readonly clone:

git clone https://github.com/username/project.git

Upvotes: 1

Related Questions