Connecting Git for code deployment

Git is a powerful version control system that helps developers track changes to their code and collaborate efficiently. It allows you to manage multiple versions of your project, making it easier to handle updates and rollbacks. By using Git, developers can ensure that the latest code is always accessible and securely stored in repositories like GitHub, GitLab, or Bitbucket.

KloudBean simplifies the code deployment process by offering seamless Git integration. With just a simple cloning process, you can connect your Git repository to KloudBean. If your repository is private, KloudBean allows you to add an SSH key for secure access. This straightforward setup removes the complexities of manual deployment and makes it incredibly easy and handy to deploy code updates. KloudBean ensures your deployments are quick, secure, and efficient, giving you more time to focus on development rather than deployment tasks.

Now that we know about Git, let's take a look at the steps to enable Git and clone your repository on the KloudBean platform.

Step 1: Enable Git feature from Kloudbean console.

In order to enable Git integration, You have to follow these steps;

  1. Go to your application from Application menu.
  2. Go to Deploy Code tab from side menu.
  3. Click on ENABLE GIT INTEGRATION to enable it.
Demonstration on Enabling Git integration on Kloudbean platform.
Demonstration on Enabling Git integration on Kloudbean platform.

Once done, you should be able to see Git related fields are appeared, including button SHOW SSH KEY. This is your application specific Public Key of server. If your repository is private then these keys are very essential to connect repo to your current app. 

Demonstration on viewing SSH Key on Kloudbean platform.
Demonstration on viewing SSH Key on Kloudbean platform.

Step 2: View and Copy SSH Key

Click on SHOW SSH KEY to view and copy the keys this Public key in order to add them on your Github or any of your repository providers platform (Gitlab or Bitbucket).

Demonstration on copying SSH Key on Kloudbean platform.
Demonstration on copying SSH Key on Kloudbean platform.

Step 3: Deploy SSH Key on Github Repository

Once keys are copied. Go to your Git repository, and click on Settings tab in top menu.

Demonstration on adding SSH Key on Github.
Demonstration on adding SSH Key on Github.

From the left side menu, click on Deploy keys option and followed by Add deploy key.

Demonstration on adding SSH Key on Github.
Demonstration on adding SSH Key on Github.

After this Deploy keys section will appear with Title and Key fields to add.

  1. Add your key title.
  2. Insert the public key that we just copied from Kloudbean console.
  3. Click on Add key button to save this key.
Demonstration on adding SSH Key on Github.
Demonstration on adding SSH Key on Github.

After this we should be able to clone this repo on our server in kloudbean.

Step 4: Copy Repository Address

In order to copy repository URL, Click on Code button in your repo, from SSH tab copy the git url.

Demonstration on getting repository SSH URL from Github.
Demonstration on getting repository SSH URL from Github.

Step 5: Insert Repository address and Clone it

After copying the repo url.

  1. Paste this URL in Kloudbean's Git Branch Address field and click on Load icon to connect repo.
  2. Once done you should be able to see available branches in Branch field to list to select and clone required branch.
  3. Deployment Path is optional fields to clone repo in desired directory.
  4. After this click on Clone Now button to initiate repo cloning.
Demonstration on adding repository URL and cloning it on Kloudbean platform.
Demonstration on adding repository URL and cloning it on Kloudbean platform.

With this click your repository should be cloned on your app and ready for deployment.

Conclusion

KloudBean simplifies your deployment process by integrating Git, making it faster, more secure, and hassle-free. With just a few simple steps, you can connect your repository and automate the deployment of your code, ensuring a seamless development workflow. Whether you're using a public or private repository, KloudBean ensures your code is deployed with minimal effort and maximum efficiency. Embrace the power of Git integration and optimize your development process today!

If you face any challenges while setting up Git or managing your deployments on KloudBean, our dedicated support team is available 24/7 to help you every step of the way.

Was this article helpful?

Application Security and Performance Settings
Enabling Auto Deployment with Kloudbean CI/CD.