Currently, the cPanel interface does not work with private-repositories on bitbucket.org. Hence we recommend this workaround.
Create a password-less ssh-key from
cPanel > Terminal by entering the following command
cd ~/.ssh/
ssh-keygen -t rsa -b 4096 -C "username@example"
In the above command, replace '
username' with cPanel's username, '
example' with domain-name. When prompted for a password press 'enter' twice
without entering a password.
Now display the generated public-key using the command
cat ~/.ssh/id_rsa.pub
Copy and paste the displayed public-key into the
bitbucket.org > Personal Settings > Security > SSH Keys
Then from
cPanel > Terminal create a new file with the command
touch ~.ssh/config
Now paste into it the following contents and save it. You can use your favorite editor to achieve this
host bitbucket.org
HostName bitbucket.org
IdentityFile ~/.ssh/id_rsa
User git
From
cPanel > Terminal set permissions for the new files
chmod 600 ~/.ssh/config && chmod 400 ~/.ssh/id_rsa
We are ready to test the connection to bitbucket.org using key authentication by running the command at cPanel > Terminal
ssh -i ~/.ssh/id_rsa -T [email protected]
If you get an error, please create a ticket for us to look into the issue, else enter the following command to clone the repository from
cPanel > Terminal
git clone ssh://[email protected]/user/privaterepositoryname.git
Replace '
user' with bitbucket.org account's username and '
privaterepositoryname' with the repository name at bitbucket.org that you want to clone to cPanel