Skip to content

Instantly share code, notes, and snippets.

@creatiko
Forked from pj8912/private_github_cpanel.md
Last active December 3, 2025 20:24
Show Gist options
  • Select an option

  • Save creatiko/0b88e22bcf56a0e31f3e12710efc3453 to your computer and use it in GitHub Desktop.

Select an option

Save creatiko/0b88e22bcf56a0e31f3e12710efc3453 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 256 -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