israelroldan / grunt-ssh

SSH, SFTP tasks for Grunt.
https://npmjs.org/package/grunt-ssh
MIT License
244 stars 70 forks source link

Error: All configured authentication methods failed #139

Open JordanGabriel opened 7 years ago

JordanGabriel commented 7 years ago

I'm attempting to use grunt-ssh to connect to my repository in AWS to pull into my dev server.

I've followed the steps in the grunt-ssh guide and here's a snippet from my grunt file:

sshexec: {
  dev: {
    command: ['cd /var/www/html && git pull -f origin dev'],
    options: {
      host: '<%= config.host %>',
      username: '<%= config.username %>',
      privateKey: '<%= grunt.file.read(config.privateKeyPath) %>',
      passphrase: '<%= config.privateKeyPassphrase %>'
    }
  }
}

My config.json file:

{
  "host": "git-codecommit.us-east-1.amazonaws.com",
  "username": "username",
  "privateKeyPath": "/path/to/privatekey",
  "privateKeyPassphrase": "passphrase for privatekey"
}

The error I'm receiving is:

Warning: Connection :: error :: Error: All configured authentication methods failed Use --force to continue.

Not really sure where to go from here, as I've searched everyone for a solution. Any insights or debugging concepts?

Thanks!