cancel
Showing results for 
Search instead for 
Did you mean: 

git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

I exactly followed the procedure  http://devdocs.magento.com/guides/v2.0/install-gde/prereq/dev_install.html#instgde-prereq-compose-cl... Hit error:

 

[magento_user@RHELPC /var/www/html]$ git clone -b master https://github.com/magento/magento2.git
fatal: could not create work tree dir 'magento2'.: Permission denied

 

Do  I have to change the permission of /var/www/html/?

 

[magento_user@RHELPC /var/www]$ ll
total 20
drwxr-xr-x. 2 root      root 4096 Dec  5 10:45 cgi-bin
drwxr-xr-x. 3 root      root 4096 Dec  5 10:42 error
drwxr-xr-x. 3 root      root 4096 Dec  5 10:45 html
drwxr-xr-x. 3 root      root 4096 Dec  5 20:05 icons
drwxr-xr-x. 2 webalizer root 4096 Dec  5 10:45 usage

Thanks very much for help!

 

6 REPLIES

Re: git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

Fixed now, it is permission issue. Thanks!

Re: git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

@APGD Solution please!!?

Re: git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

I am looking for the exact same fix

Re: git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

@mikeguy82

Check that you are logged in as the right user who has full access to the installation directory. 

 

Post your desktop screenshot so I can check and advise you better. 

Magento Certified Solution Specialist | Lead Magento developer
If this response was helpful to you, consider giving kudos to this post

Re: git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

I fixed this, thanks for the reply.
The only issue is I don't remember how exactly I fixed it to post for
everyone else.

Re: git clone:fatal: could not create work tree dir 'magento2'.: Permission denied

@mikeguy82

Fantastic. Well done. 

Don't forget to share the knowledge when you know how you fixed it exactly. 

 

Cheers 

Magento Certified Solution Specialist | Lead Magento developer
If this response was helpful to you, consider giving kudos to this post