Adding private git repo via cPanel

后端 未结 4 2027
情话喂你
情话喂你 2021-02-08 03:53

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

4条回答
  •  死守一世寂寞
    2021-02-08 04:38

    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

提交回复
热议问题