Cloning GIT repository in Plesk: Failed to gather public SSH host key for the

When trying to clone GIT repository in Plesk (by using its GIT interface) from you may face the following error:

This can be fixed easily in a following way:

  • Use the Plesk File Manager or connect via SFTP to your webspace and navigate to /.ssh/ directory (just outside of /httpdocs/ directory)
  • If you do not see a file there named “git_known_hosts“, create it and save with permissions “0600”..
  • Ensure that the “git_known_hosts” file has also a proper owner and group assigned (Set the owner as the username of your webspace. Group should always be “psacln“)
  • Open this page on Bitbucket and copy its contents:
  • Open the “git_known_hosts” file (the one you created or checked earlier) and append the copied contents to it – then save the changes afterwards.

Now you should be able to sucessfully clone the GIT repository.

About the author
I'm a full-stack WordPress developer with a 10+ years of solid experience in the core web development languages, development processes / techniques, web security, Linux server management and with pretty good understanding about proper semantics, UX/UI, technical SEO, good design and basic knowledge of company leadership. On top of that - a distant 5+ years experience as a computer and electronics repair technician which often enables me to understand also how the things work at the hardware level.