-
Notifications
You must be signed in to change notification settings - Fork 198
Open
Description
I have the following script, which I have installed globally:
#!/usr/bin/env node
const path = require('path');
const yargs = require('yargs').argv;
const ghpages = require('gh-pages');
ghpages.publish(path.join(process.cwd(), './dist'), {
branch: 'master'
}, err => {
console.log(err, process.cwd());
});
I am getting the following error:
{ ProcessError: fatal: could not create work tree dir '../../../../usr/lib/node_modules/gh-deploy-extended/node_modules/gh-pages/.cache': Permission denied
at ChildProcess.<anonymous> (/usr/lib/node_modules/gh-deploy-extended/node_modules/gh-pages/lib/git.js:47:23)
at emitTwo (events.js:106:13)
at ChildProcess.emit (events.js:191:7)
at maybeClose (internal/child_process.js:852:16)
at Socket.<anonymous> (internal/child_process.js:323:11)
at emitOne (events.js:96:13)
at Socket.emit (events.js:188:7)
at Pipe._handle.close [as _onclose] (net.js:492:12)
code: 128,
message: 'fatal: could not create work tree dir \'../../../../usr/lib/node_modules/gh-deploy-extended/node_modules/gh-pages/.cache\': Permission denied\n',
name: 'ProcessError' } '/home/otis/Developer/portfolio'
If I add the following option: clone: '/tmp/gh-pages'
I stop getting permission errors and get the following:
{ Error: ENOENT: no such file or directory, mkdir ''
at Error (native) errno: -2, code: 'ENOENT', syscall: 'mkdir', path: '' } '/home/otis/Developer/portfolio'
Any ideas?
Cheers.
Metadata
Metadata
Assignees
Labels
No labels