Cloning private repository with cPanel SSH key throw error "permission denied"

Viewed 216
  1. I accessed my cPanel server via SSH with help of username@host and password.
  2. Generated SSH key (RSA) and added it to my GitLab account.
  3. When I tried cloning it shows me an error, fatal: Could not read from remote repository

I think this is an error from the cPanel side but not able to resolve, help me out

1 Answers

From your CPanel server session, check if your generated key works with:

ssh -Tv git@gitlab.com

If you don't see a Welcome to GitLab, @username! at the end, that means the key is not properly registered.

Related