ProcessError: fatal: could not create work tree dir, Permission denied
See original GitHub issueMacBook-Pro-gkucmierz:coin-tools gkucmierz$ ngh --no-silent
Cloning git@github.com:gkucmierz/coin-tools.git into ../../../../usr/local/lib/node_modules/angular-cli-ghpages/node_modules/gh-pages/.cache
An error occurred!
(node:17668) UnhandledPromiseRejectionWarning: Unhandled promise rejection (rejection id: 2): ProcessError: fatal: could not create work tree dir '../../../../usr/local/lib/node_modules/angular-cli-ghpages/node_modules/gh-pages/.cache': Permission denied
Issue Analytics
- State:
- Created 7 years ago
- Reactions:8
- Comments:11 (6 by maintainers)
Top Results From Across the Web
Could not create work tree dir 'example.com'. - Stack Overflow
Most common reason for this error is that you don't have permission to create file in the current directory. Ensure you are in...
Read more >fatal: could not create work tree dir Permission denied #1422
Trying to run this for the first time and I'm getting an error. Steps to reproduce the issue: run $ fin project create;...
Read more >fatal could not create work tree dir C Program Files Git data ...
Hi Guys,. I am trying to clone a repository using git clone command. But it is showing me the below given error.
Read more >fatal: could not create work tree dir 'metasploit-framework ...
You are trying to git clone into the /opt directory and don't have privileges. Use:
Read more >How To Clone A Git Repo In Docker Quickstart Terminal
[git]fatal: could not create work tree dir 'xxx': Permission denied Git Init Failed Cannot Run Git: Failed to start Git process Cannot run...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found

Hmmm… strange. I’m not on a Mac, so I can’t reproduce. The
.cachedirectory does not have the write/create permission to create the repo.Please try this as a quick workaround:
sudo chown -R **yourusername** /usr/local/lib/node_modules/angular-cli-ghpages/node_modules/gh-pages/.cache(as seen here http://stackoverflow.com/a/23151665/2042765)@gkucmierz
sudo nghworked for me