1

I am trying to set up a Grunt task to ssh into a remote server and perform some operations using grunt-ssh. I am using git bash on a windows machine. The relevant parts of my Gruntfile.js are the following:

grunt.initConfig({
sshconfig: {
    portfolioServer: {
    host: 'myWebsite.com',
    username: 'root',
    agent: process.env.SSH_AUTH_SOCK,
    }
},

sshexec:{
    deploy:{
    command: [
        'cd portfolio',
        'git pull'
    ].join(' && ')
    },
    options:{
    config: 'portfolioServer'
    }
},


........etc.

grunt.loadNpmTasks('grunt-ssh');

My problem is that when I run my grunt deploy task, i get the following error:

Running "sshexec:deploy" (sshexec) task
Warning: Connection :: error :: Error: Malformed cygwin unix socket file Use --force to continue.

Aborted due to warnings.

If I then run using the --force flag, I get the following output:

Running "sshexec:deploy" (sshexec) task
Warning: Connection :: error :: Error: Malformed cygwin unix socket file Used --force, continuing.
Warning: Connection :: error :: Error: Authentication failure. Available authentication methods: publickey,password Used --force, continuing.

Done, but with warnings.

This seems to suggest I have either set up my SSH authentication incorrectly, or that the commands I have used to get the command line to recognize my keys are poorly formed. This confuses me a little, as I have followed the instructions here to set up SSH keys on the command line, and am able to successfully ssh into my server by typing ssh root@myWebsite.com

What is going wrong?

Craig Innes
  • 1,503
  • 11
  • 20
  • Did you come across a solution to this? – droidballoon Jan 26 '15 at 13:10
  • I just tried connecting with an ssh-agent under Cygwin 2.0.0 and after fixing a bug (unrelated to yours) that had to do with getting the right socket path, I was able to connect just fine. If you are still encountering this problem and you get a chance, please post the contents of the file at `process.env.SSH_AUTH_SOCK`. – mscdex May 06 '15 at 19:00

0 Answers0