Skip to content
  • Solutions
    By Role
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    • For Developers
    • For Content Managers
    • For Agencies
    • For IT Admins
    • For Web Hosters
    By Infrastructure
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Overview
    • AWS
    • Microsoft Azure
    • Alibaba Cloud
    • Google Cloud Platform
    • Vultr
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
    • Digital Ocean
    • Linode
    • Upcloud
    • Oracle
    • OVH
  • Product
    • Plesk Features
    • Plesk Editions
    • What’s new
    • Pricing
    • Roadmap
    • Lifecycle Policy
    • Extensions Catalogue
  • Pricing
  • Extensions
    Featured Extensions
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    • SocialBee
    • WP Toolkit
    • Sitejet Builder for Plesk
    • SEO Toolkit
    • Joomla! Toolkit
    • Premium Email
    • Email Security
    Bundles and packs:
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack
    • Business and Collaboration Edition
    • WP pack
    • Hosting pack
    • Power pack
    • Language pack

    See all Extensions

  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
  • Pricing
  • Solutions
    • By Role
      • For Developers
      • For Content Managers
      • For Agencies
      • For IT Admins
      • For Web Hosters
    • By Infrastructure
      • Overview
      • Plesk on Amazon Web Services (AWS & Lightsail)
      • Microsoft Azure
      • Alibaba Cloud
      • Google Cloud Platform
      • Vultr
      • DigitalOcean
      • Linode
      • UpCloud
      • Oracle
      • OVH
  • Products
  • Pricing
  • Extensions
    • Featured Extensions
      • SocialBee
      • WP Toolkit
      • Sitejet Builder for Plesk
      • SEO Toolkit
      • Joomla! Toolkit
      • Premium Email
      • Email Security
    • Bundles and packs:
      • Business and Collaboration Edition
      • WP pack
      • Hosting pack
      • Power pack
      • Language pack
      • See all Extensions
  • For Partners
    • Plesk Contributor Program
    • Plesk Partner Program
    • Affiliate Program
    • Plesk University
  • Help Center
    • Documentation
    • Professional Services
    • Support
    • Contact Us
    • Wiki
    • Forum
  • Plesk 360 login
  • Free Trial
Plesk 360 login
Free Trial

Knowledge Base

Unable to clone or pull updates from a remote Git repository to Plesk: Permission denied (publickey)

 
applications extensionscloningdomainsgitgit hosting

Symptoms

Unable to clone or pull updates from a remote Git repository (GitHub, Bitbucket, GitLab or others) to Plesk, one of the following errors might be displayed:

Cloning Git repository myproject.git...
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/.ssh/git_known_hosts'.
# github.com 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: The remote end hung up unexpectedly

Public key for the server at 'github.com' 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 remote Git repository (GitHub, Bitbucket, GitLab or others) does not exist or the SSH public key from the Plesk subscription account is not allowed on the remote Git repository.

Resolution

Allow the connection to the remote Git repository:

1- Copy the SSH public key from the Plesk subscription account:

New remote Git repository

Note: The following steps illustrate an example with a remote GitHub account but there is no difference with other Git repository providers such as Bitbucket, Gitlab and others.

  1. Log in to Plesk GUI

  2. Go to Domains > example.com > Git > Add Repository > Select: Remote Git hosting like GitHub or BitBucket > Set the Remote Git repository. For example, GitHub: [email protected]:jdoe/myproject.git or BitBucket: [email protected]:jdoe/myproject.git

  3. Copy the SSH public key of the Plesk subscription account:

    mceclip0.png

Existing remote Git repository

Note: The following steps illustrate an example with a remote GitHub account but there is no difference with other Git repository providers such as Bitbucket, Gitlab and others.

  1. Log in to Plesk GUI

  2. Go to Domains > example.com > Git

  3. Click on the Repository Settings option:

    mceclip1.png

  4. Copy the SSH public key of the Plesk subscription account:

    mceclip2.png

 

2- Allow the SSH public key from the Plesk subscription account on the remote Git repository:

GitHub

Note: If the message Error: Key already in use will be displayed on GitHub, verify that the SSH public key from the Plesk subscription account is not included on other GitHub repositories or accounts. For more details, check GitHub documentation.

  1. Log in to GitHub

  2. In the upper-right corner of any page, click your profile photo, then click Settings:

    mceclip3.png

  3. In the user settings sidebar, click SSH and GPG keys:

    mceclip4.png

  4. Click on New SSH key:

    mceclip5.png

  5. In the Title field, add a descriptive label for the new key. For example, you might call this key: Plesk
    SSH key

  6. Paste the Plesk subscription SSH public key into the Key field:

    mceclip6.png

  7. Click Add SSH key:

    mceclip7.png

  8. If prompted, confirm your GitHub password:

    mceclip8.png

  9. If it's a new remote Git repository, go back to Plesk and continue the cloning process by clicking on OK to apply the changes…

Tweet
Share
Share
Email
0 Shares
Read the full article
Related Posts

Exploring Plesk’s Added Value Solutions So Far in 2023

Read More »

Unveiling Sitejet Builder: The Perfect Match for Your Effortless Website Creation Needs

Read More »

Dynamic List vs. Active List: A Comprehensive Comparison – Unveiling the Ultimate Winner!

Read More »
Knowledge Base

How to link a remote Git repository to a domain in Plesk

Read More »

How to disable web statistics in Plesk?

Read More »

How to install and run Node.js application in Plesk?

Read More »

Unable to pull updates from Git repository in Plesk: Permission denied: Could not read from remote repository

Read More »

Hosting Wiki

  • Django
  • GIT
  • Server Redundancy
  • Google Cloud CDN
  • AMP
  • GitHub
  • Bare Metal Server
  • Oracle VM Server
  • Server Virtualization Software
  • Windows Server
  • Linux
  • JavaScript
  • MongoDB
  • Domain
  • Hosting Control Panel
  • Plesk
  • Web Server
  • DNS Server
  • IPv6
  • IPv4
  • SIP
  • SSH
  • UDP/IP
  • Colocation Hosting
  • Reseller Hosting
  • Cloud Hosting
  • VPS Hosting
  • Dedicated Hosting
  • Shared Hosting
  • Free Hosting
  • Managed Hosting
  • TCP/IP
X-twitter Linkedin Youtube Reddit Github
  • Product
  • Login
  • Pricing
  • Editions
  • For Partners
  • Partner Program
  • Contributor Program
  • Affiliate Program
  • Plesk University
  • Company
  • Blog
  • Careers
  • Events
  • About Plesk
  • Our Brand
  • Resources
  • User and Admin guides
  • Help Center
  • Migrate to Plesk
  • Contact Us
  • Hosting Wiki
  • Forum
  • Legal
  • Legal
  • Privacy Policy
  • Imprint

© 2025 WebPros International GmbH

Part of the WebPros®  Family