0

我正在尝试使用 grunt-ssh 从我的 macbook pro 自动部署服务器。所以我想要完成这项任务是从我的私人 bitbucket 存储库中提取。

一旦我grunt deploy在 bash 上进行部署,部署看起来还不错,但服务器中没有任何内容

这是我的 gruntfile: module.exports = function(grunt) { grunt.initConfig({ sshconfig: { notify: { host: 'mydomain.com', port: 22, username: 'root', agent: process.env.SSH_AUTH_SOCK } }, sshexec: { deploy: { command: [ 'cd notify', 'git pull origin master', 'npm install', ].join(' && '), options: { config: 'notify' } } } } );

    // Load the plugin that provides "sshevexc" task
    grunt.loadNpmTasks('grunt-ssh');

    // Register new task, deploy
    grunt.registerTask('deploy', ['sshexec:deploy'], function(err){
        if(err)
            return false;

        grunt.log.write('Done deploying!').ok();
    });
}
4

1 回答 1

0

尝试在您的 sshconfig 中添加:

代理转发:真

于 2014-12-14T10:15:29.417 回答