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, 2020 in Git & GitHub by akhtar
• 38,260 points
20,992 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, 2020 by MD
• 95,460 points

Related Questions In Git & GitHub

0 votes
0 answers

git fatal Could not read from remote repository

I want to set git with http://danielmiessler.com/study/git/#website to manage ...READ MORE

May 20, 2022 in Git & GitHub by Kichu
• 19,050 points
3,313 views
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
• 52,360 points
1,853 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, 2020 in Git & GitHub by MD
• 95,460 points
8,770 views
+1 vote
1 answer

How to remove untracked files from the current Git working tree?

Hi@akhtar, If you have thousands of file then ...READ MORE

answered Sep 4, 2020 in Git & GitHub by MD
• 95,460 points
1,194 views
+15 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 27, 2018 in DevOps & Agile by DragonLord999
• 8,450 points
3,928 views
+2 votes
1 answer
0 votes
1 answer

error: Could not read error: unable to read tree object HEAD nothing to commit (working directory clean)

Hi@akhtar,  This kind of error may occur if ...READ MORE

answered Apr 10, 2020 in Git & GitHub by MD
• 95,460 points
8,723 views
+1 vote
2 answers

fatal: unable to access could not resolve host: GitHub

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

answered Apr 10, 2020 in Git & GitHub by MD
• 95,460 points
152,064 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP