Symptoms
-
When trying to pull updates for a domain
example.com
from remote Git repository using SSH key authorization the following error is produced:Trying to pull the updates from git repository results in the error:
Server at 'github.com' is seen for the first time. Adding its public key to the list of known hosts in '/var/www/vhosts/example.com/sub.example.com/.ssh/git_known_hosts'.
# github.com:22 SSH-2.0-libssh_0.7.0
# github.com:22 SSH-2.0-libssh_0.7.0
# github.com:22 SSH-2.0-libssh_0.7.0
Warning: Permanently added the RSA host key for IP address '203.0.113.2' to the list of 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. -
The main system user's name was recently changed.
Cause
This is a Plesk bug with ID PPPM-7291, which is planned to be fixed in one of the future product updates.
Resolution
As a workaround, perform the following steps:
-
Connect to the Plesk server via SSH.
-
Place the SSH keys for authentication in the home directory of an additional FTP user from the error (e.g. content of
/var/www/vhosts/example.com/.ssh/
directory to/var/www/vhosts/example.com/sub.example.com/.ssh/
):# mkdir -p /var/www/vhosts/example.com/sub.example.com/.ssh/
# cp -ap /var/www/vhosts/example.com/.ssh/* /var/www/vhosts/example.com/sub.example.com/.ssh/ -
In case file is present, make sure that correct permissions are set:
# chown jdoe:psacln /var/www/vhosts/example.com/sub.example.com/.ssh/id_rsa
# chmod 600 /var/www/vhosts/example.com/sub.example.com/.ssh/*Where
jdoe
is the system user of the subscription.