Applicable to:
- Plesk for Linux
Symptoms
-
Adding remote Bitbucket repository to Plesk in Domains > example.com > Git fails:
PLESK_ERROR: Deploying files to example.com
Public key for the server at 'bitbucket.org' is already known in '/var/www/vhosts/example.com/.ssh/git_known_hosts'.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
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:
-
Generate an SSH key without passphrase protection in the Bitbucket account.
-
Connect to the server via using SSH.
-
Rename the files
id_rsa
andid_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} -
Place the files
id_rsa
andid_rsa.pub
created on step 1 into/var/www/vhosts/example.com
. -
Go to Domains > example.com > Git and add the Bitbucket repository.
Comments
2 comments
Hi there, I just got my first run with Plesk until the git plugin it's amazing. But the git plugin is not working. Looks like this issue, but when I try your solution the complete plugin crashes until I move back the backup't files.
What I tried:
Your solution, result. Did not do a thing
Tried your solution in the .ssh folder (/var/www/vhosts/host.com/.ssh/id_rsa), result. Whole plugin crashed, some freaky error page. (got this error screen fixed by changing it all back to how it was)
The errorpage:
I have the same issue as above but the fix does not work - I have generated the SSH keys and added them to both Bitbucket and the server as described above. When adding the repository in Plesk, the key it displays is the key I added, so I know this is correct. The key has been added to bitbucket successfully too (directly added as an access key on the repository im trying to clone), but still get the error messages as above.
Any ideas?
Please sign in to leave a comment.