fatal: could not create work tree dir 'C:/Program Files/Git/data': Permission denied

0 votes

Hi Guys,

I am trying to clone a repository using git clone command. But it is showing me the below given error.

$ git clone https://github.com/user/branchmerge.git /data
fatal: could not create work tree dir 'C:/Program Files/Git/data': Permission denied

Can anyone help me to resolve this error?

Jun 12 in Git & GitHub by akhtar
• 18,250 points
424 views

1 answer to this question.

0 votes

Hi@akhtar,

You may get this error if your folder contains previous files. So before git clone command try to remove all the files from that folder. You can use the below-given command.

$ rm -rf *
$ git clone https://github.com/user/branchmerge.git /data

I hope this will help.

answered Jun 14 by MD
• 42,420 points

Related Questions In Git & GitHub

0 votes
1 answer

gerrit-cherry-pick:fatal: 'origin' does not appear to be a git repository

The user account making that command does ...READ MORE

answered Aug 13, 2018 in Git & GitHub by Kalgi
• 51,890 points
438 views
0 votes
1 answer

fatal: Not a git repository (or any of the parent directories): .git

Hi@akhtar, I think you didn't initialize your folder ...READ MORE

answered Apr 29 in Git & GitHub by MD
• 42,420 points
990 views
0 votes
1 answer

Git origin not found

For this to work, you need to ...READ MORE

answered Apr 25, 2018 in Git & GitHub by DragonLord999
• 8,420 points
369 views
+1 vote
4 answers

GIT plugin in jenkins not able to connect to GIT repository

This looks like a git configuration issue, ...READ MORE

answered Oct 25, 2018 in Git & GitHub by Alia
5,352 views
+13 votes
2 answers

Git management technique when there are multiple customers and need multiple customization?

Consider this - In 'extended' Git-Flow, (Git-Multi-Flow, ...READ MORE

answered Mar 26, 2018 in DevOps & Agile by DragonLord999
• 8,420 points
603 views
0 votes
1 answer
0 votes
1 answer
0 votes
1 answer

fatal: unable to access could not resolve host: GitHub

Hi@akhtar, This can be caused in incorrect proxy ...READ MORE

answered Apr 10 in Git & GitHub by MD
• 42,420 points
4,414 views