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:
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.
- Select the Git service provider of your choice and create a new Git repository if you don't already have one.
- Paste the repository's
SSH URL
in step 2 to generate the SSH 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.
A user needs to have Create permission for application resources on the workspace to be able to connect or disconnect an app to Git. This permission can be shared through Workspace Administrator and Developer roles or through custom roles using granular access control. For more information, see Default Roles and Granular Access Control.