How to clone Bitbucket git into cPanel Git™ Version Control
Asked Answered
P

3

6

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.

Pamphleteer answered 16/7, 2020 at 11:3 Comment(1)
I'm running into the same issue, have you found a solution? The answer provided has the same result and I'm getting the same error messages as your screenshots.Trice
O
2
  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
Odom answered 3/10, 2020 at 2:39 Comment(0)
C
0

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.

Carlinecarling answered 13/2, 2023 at 4:38 Comment(0)
M
0
  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.

Maddux answered 22/3, 2023 at 7:6 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.