Unable to use grunt-ssh to do tasks on server

466 views Asked by At

i am trying to use grunt-ssh to automate deployment of server from my macbook pro. So what i am trying to do with this task is to pull from my private bitbucket depository.

Deployment is looks okay once i do grunt deploy on bash but nothing gets pulled in server

This is my 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();
    });
}
1

There are 1 answers

0
Eki On

Try adding in your sshconfig:

agentForward: true