question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

ProcessError: fatal: could not create work tree dir, Permission denied

See original GitHub issue
MacBook-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:closed
  • Created 7 years ago
  • Reactions:8
  • Comments:11 (6 by maintainers)

github_iconTop GitHub Comments

7reactions
JohannesHoppecommented, Feb 19, 2017

ProcessError: fatal: could not create work tree dir ‘…/…/…/…/usr/local/lib/node_modules/angular-cli-ghpages/node_modules/gh-pages/.cache’: Permission denied

Hmmm… strange. I’m not on a Mac, so I can’t reproduce. The .cache directory 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)

3reactions
MurhafSouslicommented, Jul 24, 2017

@gkucmierz sudo ngh worked for me

Read more comments on GitHub >

github_iconTop 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 >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found