dasuchin / grunt-ssh-deploy

Grunt SSH Deployment
MIT License
66 stars 45 forks source link

Cannot read property 'length' of undefined #50

Closed skolsuper closed 8 years ago

skolsuper commented 8 years ago

I get this unhelpful error message when trying to deploy with the below config:

  environments: {
      options: {
        current_symlink: 'current',
        deploy_path: '/webapps/<%= appConfig.package.name %>',
        local_path: './dist'
      },
      dev: {
        options: {
          host: 'my-ec2-instance.compute.amazonaws.com',
          privateKey: require('fs').readFileSync('/path/to/key'),
          tag: '<%= appConfig.package.version %>',
          releases_to_keep: '3'
        }
      }
    },

Adding a username to the options causes the connection to fail with Error: Authentication failure. Available authentication methods: publickey

skolsuper commented 8 years ago

Issue resolved: I was using the wrong username in the first place when I got the Authentication failure.