Connect Git Repository
The first step to using version control in Appsmith is to connect your remote repository with the app. Please follow the steps given below:
Prerequisites
Create a new repository on your Git hosting service and copy the SSH URL
. The repository shouldn't contain any files.
Version Control works with any Git hosting service that supports SSH protocol and deploy keys. HTTPS Git connections are currently not supported on Appsmith.
Generate a deploy key
Open the Appsmith app you want to connect to Git and click the Connect Git button on the left of the bottom bar.
In the Git connection Modal, paste your repository’s
SSH URL
and click the Generate Key button to generate an SSH key.Pick the key that's compatible with your Git hosting service. Appsmith supports two types of keys - ECDSA 256 and RSA 4096. To select a key, Click ︙ icon and select the desired key.
Copy the SSH key.
Add the deploy key in the Repository
- GitHub
- GitLab
- Bitbucket
- Azure
- In your repository, go to the Settings tab.
- On the navigation bar, under Security, click Deploy Keys.
- Click Add deploy key. Add a title for the key and paste the generated
SSH key
in the Key input box. - Select the Allow write access checkbox.
- Click Add key.
- Open your repository and from the sidebar, go to the Settings > Repository and expand the Deploy keys section.
- Click Add key. Add the title and paste the generated key in the key section.
- Enable the Grant write permissions to this key checkbox
- Click Add key.
- Open Personal Bitbucket settings from the top right corner and under security go to SSH keys.
- Click Add key, add the label and paste the generated key in the Key input box.
- Go to User Settings from the top right corner and open SSH public keys.
- Click + New key, add the key name and paste the generated
RSA 4096
key in the Public Key Data input box.
Complete Git setup
Go back to Git connection Modal in Appsmith and click Connect, it may take some time and when the connection is successful, the app is added to your repository by system generated commit.
For self-hosted instances, to maintain the Git repositories, please update the local file path.