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 'SSH Access' section. I then added the key onto the private repo in git at the 'Deploy keys' section.
But when I try to clone the repo on cPanel I get the error:
Error: “/usr/local/cpanel/3rdparty/bin/git” reported error code “128” when it ended: Permission denied (publickey). fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists.
I'm trying to clone with SSH [email protected]:myusername/myrepo.git
Have I done something wrong or missed a step?
Clone The Private Repo via CpanelNavigate to Cpanel - Git Version Control - Create. Configure the required information. In the clone URL, paste the SSH link (copied from the GitHub repo). Cpanel will clone the private repo to the configured path.
Under your repository name, click Settings. In the "Access" section of the sidebar, click Collaborators & teams. Click Invite a collaborator. In the search field, start typing the name of person you want to invite, then click a name in the list of matches.
To register the repository SSH key with your private repository on GitHub, go to the Settings for the repository. On GitHub the repository SSH key is referred to by the term Deploy key. Search down the settings page and find the Deploy keys section and select it. Click on the Add deploy key button.
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 : [email protected]:/<private_repository_name>.git
[email protected]:<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)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With