I know you will find hundreds of article about deploying code to server from BitBucket or Github , but I found that searching an article that will describe you all the steps from tip to toe is really a time taking tasks. I already felt this pain of searching and assembling different articles to provide me every step that inclused server side and bitbucket side configurations. This pain forced me to write this article for the community. So basically there are two sides of this work. First is your Server and Second is the bitbucket or Github , I will explain the configuration for each in 3 articles . Lets start with Server. Server Side Requirements: ssh should be enabled on your server. if not please contact your hosting provider.ssh-keygen command should be enabled on your server. if not please contact your hosting provider.git should be enabled on your server. if not please contact your hosting provider.Steps:login to your server through SSH, please make sure you have adminstrative permissions to run commands via ssh. Once you are logged in via SSH, you need to generate ssh keys. use ssh-keygen command . you need ssh keys to take pull from bitbucket or github without asking for password by them. Once you generate key , copy content of id_rsa.pub file under .ssh folder . if you don't know where your .ssh folder , you can check the above image. when you generate ssh keys it will tell you where it is storing id_rsa.pub file. use #cat path-to-.ssh-folder/id_rsa.pubcopy the output You need to paste this key in bitbucket or github under deployment key section. Once done go back to your ssh terminal screen and start creating git repo under your web root. in my case its /public_html git init Blog image: Blog category: Web DevelopmentGeneral