2

Broadly, I'm having problems running drush sql-sync so that I can get a local copy of my dev database. I was getting an "The external command could not be executed due to an application error ... code: 255)" type thing.

To diagnose the problem more specifically, I ran drush @local sql-conf and got

 Array
    (
        [driver] => mysql
        [database] => soa
        [username] => drupaluser
        [host] => 127.0.0.1
        [port] => 33066
    )

When I then ran drush @dev sql-conf I got

Permission denied (publickey,password).

Running drush @dev sql-conf -s results in

Simulating backend invoke: ssh -o PasswordAuthentication=no git@dev.sub.mysite.com 'drush  --invoke --simulate --root=/var/www/dev --uri=http://default  sql-conf   --site=sub --env=dev 2>&1' 2>&1
3

Permission denied (publickey,password).

This means the issue isn't with Drush, it's that the server that matches up to your @dev alias doesn't have your SSH public key set up to allow you access. Either your public key hasn't been added to the ~/.ssh/authorized_keys file or the permissions on that file (or the ~/.ssh/ directory) have the wrong settings.

  • Thank you! My id_rsa.pub was definitely copied into autorized_keys...Actually turned out I had rewritten ~/.ssh/config somehow! Cleaned that up and in business. – Beatrice Sep 27 '13 at 20:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.