Plesk

Adding remote Bitbucket repository to Plesk fails: Permission denied (publickey)

Symptoms

Cause

The SSH key was generated with passphrase protection.

Resolution

Support of SSH keys with passphrase protection is yet to be implemented in the Plesk Git extension.

Vote for the corresponding feature suggestion on our UserVoice portal.
The top-ranked suggestions are likely to be implemented in one of the next versions of the extension.

Until this feature is implemented, the following workaround can be used:

  1. Generate an SSH key without passphrase protection in the Bitbucket account.

  2. Connect to the server via using SSH.

  3. Rename the files id_rsa and id_rsa.pub in /var/www/vhosts/example.com in case they are exist:

    # mv /var/www/vhosts/example.com/id_rsa{,.orig}
    # mv /var/www/vhosts/example.com/id_rsa.pub{,.orig}

  4. Place the files id_rsa and id_rsa.pub created on step 1 into /var/www/vhosts/example.com.

  5. Go to Domains > example.com > Git and add the Bitbucket repository.