- Plesk for Linux
When trying to clone remote Git repository, the following error appears:
PLESK_ERROR: Cloning Git repository myrepo.git...
Cloning into bare repository '/var/www/vhosts/example.com/git/myrepo.git'...
remote: Invalid username or password.
fatal: Authentication failed for 'https://github.com/myrep344345/myrepo.git/'
Or deploying files to domains fails with:
PLESK_ERROR: gitmng failed: Cloning into bare repository 'C:\inetpub\vhosts\example.com\git\example.com.git'...
bash: /dev/tty: No such device or address
error: failed to execute prompt script (exit code 1)
fatal: could not read Password for 'https://github.com/myrep344345/myrepo.git/' Invalid argument
(Error code 128)
Wrong authentication method is used.
In this case, it is required to add an SSH key to to the settings of the remote Git repository.
Go to Domains > example.com > Git and add Remote Git repository with syntax like
Before clicking OK on this screen, add the SSH key to the settings of the remote Git repository. For details, see the documentation for adding an SSH key for GitHub and BitBucket.
For example for BitBucket account go to bitbucket.org > Settings > SECURITY > SSH keys > Add key
Check Administrator's Guide for details.