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
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
Fog git url which is copied from Clone button in bitbucket, I am getting following error.
[email protected]:<workspace_ID>/<repo_name>.git
- 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
repository settings
on Your Bitbucket Repository ConsoleGeneral
menu, clickAccess keys
Add key
buttonid_rsa.pub
file fromcpanel file manager
that you have createdKey
form input, and clickAdd SSH Key
buttonknown_hosts
file incpanel file manager
.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.
Go into your
cPanel
and then go intoTerminal
.Use the terminal to generate an key by typing in:
ssh-keygen -t rsa -C YourEmailAddress
leave the password as blank.Go back to the main dashboard of your cPanel, then into
SSH Access
and then intoManage SSH Keys
.You will notice that the public key has been generated. Under
Public Keys
click onView/Download
and copy the key.Go into the bitbucket repo and click on
Repository settings
and then onAccess keys
.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, theClone 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 onClone
.