I\'m trying to add a private git repo onto cPanel but have ran into permission issues and not sure where I\'m going wrong
I have generated the SSH keys in cPanel at the
CLONE GITHUB REPOSITORY TO CPANEL STEPS
steps 1. Cpanel -> SSH Access -> Generate New Key(without enter pasword)->after generated key go to under public key-> manage-> authorize (make authoize) -> back, now view/download-> copy key
Step 2. Go Github-> https://github.com// -> Settings(repository setting) ->Deploy Keys (rights side)-> add deploy key (give title,and add key)-> done
Step 3. Go to Cpanel -> Git™ Version Control -> clone url : git@github.com:/<private_repository_name>.git
git@github.com:<user_name>/<repository_name>.git
-> give_repository_path
-> give_ repository_name
-> create
Step 4. manage repository from list-> Manage -> pull or deploy from Github -> Click on Update from Remote: works perfectly(any files edit or delete you fetch/pull from GitHub now)
did you get to the bottom of this I was experiencing the same after removing the pass phrase from the key it worked
After many hours i find this solution and it solved
My problem was caused by the way cPanel generates ssl keys. When you create a key cPanel, forced you to insert a passphrase. But GitLab is not compatible with such a key apparently.
The solution was to create the key on the local machine and import it to cPanel. Passphrases are for extra security when the key is stolen
as @vladmacovi said and i test it in my cpanel and its work
1- login to cpanel and gitlab
2- goto https://gitlab.com/profile/keys
3- Paste your public SSH key, which is usually contained in the file '~/.ssh/id_ed25519.pub' or '~/.ssh/id_rsa.pub' and begins with 'ssh-ed25519' or 'ssh-rsa'. Don't use your private SSH key.
4- create a key with this command:
ssh-keygen -t rsa -b 2048 -C "your.email@gmail.com"
5- this command create pub file and ppk file so you can open content of pub file.
6- goto cpanel /frontend/paper_lantern/version_control/index.html#/list/
create a new git repo then click on ssh then from: /frontend/paper_lantern/telnet/index.html
like this picture:
7- cleck on import key from : /frontend/paper_lantern/telnet/keys/importkey.html
then paste your key
please dont type anything in Passphrase box
8- then click on import button then authorized it
9- configure git form like this picture
I have found an issue with the SSH key import within cPanel, when I import a private key via the cPanel SSH Key web interface it creates the file but includes the characters ^M
as line breaks.
When I edited the file via SSH and copied the original key from my desktop the Git operation via cPanel worked straight away.
Edit the private key after import and ensure there are no line-ending or other stray characters.