Skip to content

Instantly share code, notes, and snippets.

@pj8912
Created August 27, 2023 13:54
Show Gist options
  • Save pj8912/20918c9980e496e42a4cf52972c74c74 to your computer and use it in GitHub Desktop.
Save pj8912/20918c9980e496e42a4cf52972c74c74 to your computer and use it in GitHub Desktop.
Connect PRIVATE GITHUB repository to CPANEL hosting account

Connect PRIVATE GITHUB repository to CPANEL hosting account

27/08/2023


Cpanel

  • Go to terminal of your cpanel account and type the command below to generate ecdsa key pair
ssh-keygen -t ecdsa -b 251 -c "EMAIL_ADDRESS"
  • "EMAIL_ADDRESS" is the email that you use for your github account.
  • In your cpanel terminal go to .ssh/ folder
cd .ssh/
  • You can read your PublicKey, that has to be added to your github repo
cat id_ecdsa.pub
  • You can see your public key, copy that public key and go to your github private repo

Github

  • Go to Settings of your private github repo.
  • Under Security on the side nav, click on Deploy keys.
  • Add Title and paste that public key in Key.

image

  • Allow write access depends whether you like to push changes to your github repo from your hosting.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment