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.
- Log in to cPanel.
- Open SSH Access, then click Manage SSH Keys.
- Click Generate a New Key and follow the form. Save it.
- Click Manage next to the new public key. Click Authorize if it is not authorized.
- Click View/Download for the public key, and copy the text.
- Go to your Git website. Open your account or repo settings and find the SSH keys or deploy keys area.
- Paste the public key and save.
- Back in cPanel, open Git Version Control.
- Click Create and enter the repo address in SSH form. It looks like
git@github.com:name/repo.git. - Choose a clone path, then click Create.
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.