Node.js 如何在Shipit.js上设置密码

Node.js 如何在Shipit.js上设置密码,node.js,sudo,shipitjs,Node.js,Sudo,Shipitjs,我对shipit.js的部署如下所示 // shipitfile.js module.exports = shipit => { // Load shipit-deploy tasks require('shipit-deploy')(shipit) const backend_folder = 'backend'; shipit.initConfig({ default: { deployTo: '/var/www/app/', rep

我对shipit.js的部署如下所示

// shipitfile.js
module.exports = shipit => {
  // Load shipit-deploy tasks
  require('shipit-deploy')(shipit)
  const backend_folder = 'backend';


  shipit.initConfig({
    default: {
      deployTo: '/var/www/app/',
      repositoryUrl: 'git@github.com:user/app.git',
    },
    staging: {
      servers: 'deploy@ip.ip.ip.ip',
    },
  })

  shipit.blTask('npm:install', async () => {
    await shipit.remote(`cd ${shipit.releasePath}/${backend_folder}/ && npm install --production`)
  })

  shipit.blTask('server:start', async () => {
    const be_command = 'NODE_ENV=production forever start build/server.js'
    await shipit.remote(`cd ${shipit.config.deployTo}/current/`
                        + `${backend_folder}/ && ${be_command}`)
  })

  shipit.blTask('server:restart', async () => {
    const command = 'forever restartall'
    await shipit.remote(`cd ${shipit.config.deployTo} && ${command}`)
  })

  shipit.on('updated', () => {
    shipit.start('npm:install')
  })

  shipit.on('published', () => {
    shipit.start('server:restart')
  })
}
尝试从github克隆时,shipit失败,因为
deploy
需要使用sudo创建文件夹。我如何给shipit
deploy
提供密码,以便它可以sudo和创建文件夹

多谢各位