Flash Sale:75% Off Hosting + Free DomainEnds in13h47m14sView Plans
Hostvento logoHostvento

Fix cPanel Git Error 128: Permission Denied

This error appears when Git cannot get into your code repository. This guide shows the usual causes and fixes.

Website Management2 min read10 steps

What is Git?

Git is a tool that tracks changes to your code. A repository (repo) is the folder where Git keeps the code and its history. cPanel has a feature called Git Version Control that can clone a repo onto your hosting. To clone means to make a copy.

What does error 128 mean?

Error code 128 is a general Git failure. With the words "permission denied", it means the server did not accept your login. It is like a guard who does not know your face.

Common causes

  • The SSH key is missing or not added to GitHub, GitLab or Bitbucket.
  • The key has no authorization in cPanel.
  • You used a wrong repo address.
  • The repo is private and you used a plain HTTPS link without a login.
  • Your cPanel folder has wrong permissions.

Steps to fix it

An SSH key is a pair of long codes. One part stays on your server. The other part is shared with the Git website to prove who you are.

  1. Log in to cPanel.
  2. Open SSH Access, then click Manage SSH Keys.
  3. Click Generate a New Key and follow the form. Save it.
  4. Click Manage next to the new public key. Click Authorize if it is not authorized.
  5. Click View/Download for the public key, and copy the text.
  6. Go to your Git website. Open your account or repo settings and find the SSH keys or deploy keys area.
  7. Paste the public key and save.
  8. Back in cPanel, open Git Version Control.
  9. Click Create and enter the repo address in SSH form. It looks like git@github.com:name/repo.git.
  10. Choose a clone path, then click Create.
Tip: If the key has a passphrase, cPanel may not be able to use it. Make a key without one for this use. A passphrase is a password for the key itself.

Still stuck?

Check that the clone folder is empty and is inside your home folder. Open a support ticket and give the exact error message.

Quick recap

  • Error 128 with permission denied means a login failure.
  • Make and authorize an SSH key in cPanel.
  • Add the public key to your Git website.
  • Use the SSH address of the repo.