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
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
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
Now paste into it the following contents and save it. You can use your favorite editor to achieve this
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 firstname.lastname@example.org
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@example.com/user/privaterepositoryname.git
' with bitbucket.org account's username and 'privaterepositoryname
' with the repository name at bitbucket.org that you want to clone to cPanel