Deploy Code to Your Application Using Git

Step 1 : Find Application Administration

Log in to your Kloudbean Console using your credentials.

  1. From the top menu bar Choose Servers
  2. Next, pick the server where your application is running.

3. Click on Globe icon for Application.

4. Choose your Application

Step 2:  Generate SSH keys 

We'll utilize these keys to enable access from your Kloudbean server to your git repository.

  1. Navigate to the Deployment via Git section within the Application Management area.
  2. Then, simply click on the Generate SSH Keys button to create the keys.

Next, click on "Show SSH Key" to download the SSH Public Key, which will be utilized in the following step.

The user will click on "Show SSH Key," prompting a pop-up to appear. From there, the user can easily copy the SSH key and paste it into their GitHub account.

Step 3: Setup SSH Key to Git Repository Like: Github, Gitlab, Bitbucket

We'll be using a GitHub account for this demonstration.

1. Log into your GitHub account and In the upper-right corner of any page, click your profile photo, then click Settings.

2. Navigate to the Settings tab.

3. Within the Settings menu, locate and click on "SSH and GPG Keys."

4. Click the "Add SSH Key" button to initiate the addition of the SSH key we copied earlier.

5. Paste the content of the SSH public key into the "Key" field on GitHub.

6. Optionally, you can give a name to this key in the "Title" field (e.g., Demo).

7. Finally, click on the "Add SSH Key" button to save the SSH key.

By completing these steps, you'll have successfully added the SSH key to your GitHub repository, allowing for secure communication and enabling Git operations such as pushing code changes.

Step4 : Copy the SSH address of the repository.

Please copy the repository address exactly as displayed in the image below. Ensure that you select the SSH address, as other formats such as HTTPS are not supported.

Step 5 : Initiate the deployment of code from your repository.

  1. Return to the Kloudbean console and input the SSH address acquired in Step 4 into the "Git Remote Address" field. Proceed by clicking "Authenticate" to ensure seamless communication between Kloudbean and your Git service, like GitHub.
  2. Select the branch from your repository you wish to deploy (typically "master" by default).
  3. Specify the deployment path, remembering to conclude with a "/". Alternatively, if left blank, the code will deploy to "app-html/".
  4. Finally, hit "Clone Now" to kick off the deployment process to your chosen path.

Step 6: The repository has been successfully cloned.

You will receive a notification once the deployment process has been completed.

Additionally, you have the option to delete the repository from the server, pull the latest changes from the remote repository, or switch to a different branch.

Was this article helpful?

Working with Git using the Command Line
How to Create a Staging Environment