skip to Main Content

I have git into my Bitbucket account and I want clone those git into my cPanel Git™ Version Control. How to do that?

I was able pull git using cPanel terminal. but I want to make clone using cPanel Git™ Version Control.

We want to make bitbucket git clone using cPanel Git™ Version Control so that we can create more branches from cPanel git and do version control for cPanel copy. I tried to clone bitbucket git using https, git and ssh url into cPanel Git™ Version Control but then I am getting following error.

From BitBucket

git clone https://<AccountName>@bitbucket.org/<RepositoryName>/<BranchName>.git

Into cPanel Git™ Version Control But I am getting following error.

https://<AccountName>@bitbucket.org/<RepositoryName>/<BranchName>.git

enter image description here

Then i have tested with SSH and Git path from bitbucket

For SSH path I am getting following error.

ssh://[email protected]/<workspace_ID>/<repo_name>.git

enter image description here

Fog git url which is copied from Clone button in bitbucket, I am getting following error.

[email protected]:<workspace_ID>/<repo_name>.git

enter image description here


  • I have created SSH Access keys into cPanel, Do i have to use that anywhere for cloning ??
  • Can you guide me steps in details for cloning git from bitbucket into cPanel Git™ Version Control

Thank You.

3

Answers


    1. Go to repository settings on Your Bitbucket Repository Console
    2. Under General menu, click Access keys
    3. Click Add key button
    4. Open id_rsa.pub file from cpanel file manager that you have created
    5. Copy and paste its contents to Bitbucket Access keys under Key form input, and click Add SSH Key button
    6. On the CPanel Git™ Version Control, add and clone repository, if any error message, it will be create a known_hosts file in cpanel file manager.
    7. Repeat step 6 one more time
    Login or Signup to reply.
  1. One of the issue can be that your keys are passphrase protected. The cPanle documentation link below has a note they passphrase protected keys are not supported:

    NOTE: Keys that are passphrase protected are not compatible with cPanel Git™ Version Control.
    If your existing keys require a passphrase, please make use of the section labeled: Option #1 – Generate a New Private and Public Key Pair to learn how to generate a compatible set of keys.

    https://support.cpanel.net/hc/en-us/articles/4404218477207-How-to-Configure-SSH-Key-Authentication-for-Use-with-cPanel-Git-Version-Control

    Interestingly enough, the built in SSH Key Generator does not allow to generate keys without passphrase, which makes it very confusing as the cPanel Git™ Version Control will not work with any generated keys via cPanel SSH Key Generator. The workaround is to generate passphrase less keys using terminal access.

    Login or Signup to reply.
    1. Go into your cPanel and then go into Terminal.

    2. Use the terminal to generate an key by typing in: ssh-keygen -t rsa -C YourEmailAddress leave the password as blank.

    3. Go back to the main dashboard of your cPanel, then into SSH Access and then into Manage SSH Keys.

    4. You will notice that the public key has been generated. Under Public Keys click on View/Download and copy the key.

    5. Go into the bitbucket repo and click on Repository settings and then on Access keys.

    6. Click on Add Key and add the public key from your Cpanel.

    You should now be able to connect the repo, just keep in mind that under Git™ Version Control within the cPanel, the Clone URL should look like this [email protected]:username/mysite.git (replaced with your details).

    You can get this in Bitbucket within the repo by clicking on Commits and then on Clone.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search