Today, We want to share with you connect Bitbucket to cpanel.In this post we will show you clone git repository to cpanel, hear for cpanel git deployment we will give you demo and example for implement.In this post, we will learn about What is the difference between bitbucket vs github? with an example.
How to clone Bitbucket git into cPanel Git™ Version Control?
The ‘Bitbucket’ website has cosmetic differences from ‘GitHub’, but works similarly.
- First of all Go to
repository settings
on Your Bitbucket Repository Console - Under
General
menu, clickAccess keys
- Click
Add key
button - Open
id_rsa.pub
file fromcpanel file manager
that you have created - Copy and paste its contents to Bitbucket Access keys under
Key
form input, and clickAdd SSH Key
button - On the CPanel Git™ Version Control, add and clone repository, if any error message, it will be create a
known_hosts
file incpanel file manager
. - Repeat step 6 one more time
ref: https://stackoverflow.com/
Step 1:
Create a Folder in Cpanle on Root folder
For Example : We created Folder Name “your_project_name”. and then step 2.
Step 2: Genrate a keys
Simple in this step Genrated a Public Keys as well as Private Keys for SSH Authentication.
Generate SSH key without password command:
Step 3: Go To terminal on your cpanel
here go to Your cd.. to your root path and then fier this bellow commands.
ssh-keygen -t rsa -b 2048 -C "{Your email address}"
Step 4: Enter the SSH Git Clone URL
For Example
ssh-keygen -t rsa -b 2048 -C "username@domain_name.com"
set Cpanel SSh Clone Name
ssh://[email protected]/BitBucketUserName/your-project-name.git
Extra Git commands
- git add .
- git add {files name [seprater space]}
- git commit -m “{commit message}”
- git push {branch name}
REF: https://docs.buddybuild.com/repository/bitbucket/
Working on BitBucket using Git
-> Clone the repository into your local machine.
-> Copy and paste the link in the terminal after typing git clone
git clone (REPOSITORY URL) ssh://[email protected]/BitBucketUserName/REPOSITORY_NAME.gi
and then Check your progress by typing “git status” command into the terminal
git status
I hope you get an idea about how to use git version control in cpanel?.
I would like to have feedback on my infinityknow.com blog.
Your valuable feedback, question, or comments about this article are always welcome.
If you enjoyed and liked this post, don’t forget to share.