Skip to main content

Git Errors

This page shows how to resolve common Git errors on Appsmith.

Invalid Git repo​

Invalid Git repo

Cause​

The SSH address provided is incorrect or access rules prevent connection to the repository.

Solution​

  • Verify if the SSH address is correct and functional.
  • Check connection rules on the platform where the application is deployed.
  • If issues persist, contact support for assistance.

Invalid GitConfig​

Invalid GitConfig.

Cause​

This error occurs due to a Redis cache issue with user profiling, resulting in an invalid Git configuration.

Solution​

  • Logout from the application.
  • Login again to refresh the user profile and Git configuration.
  • If issues persist, contact support for assistance.

Conflicts while merging​

Conflicts while merging branch b <= a

Cause​

Conflicts arise during the merging process when the same file has been edited on both branches, and Git cannot automatically resolve these conflicts.

Solution​

If facing conflicts in the Appsmith UI while merging branch A into branch B, raise a pull request targeting branch B on your Git provider, and manually resolve the conflicts.

See Resolve Merge Conflicts in Git

Git push failed for pending upstream changes​

Looks like there are pending upstream changes. To prevent you from losing history, we will pull the changes and push them to your repo.

Cause​

If you're working on branch A and someone else pushes changes to the remote counterpart of the same branch, you may encounter conflicts if both have edited the same files.

Solution​

To resolve this:

  • Create a new branch from your local branch A, naming it branch A-fix.
  • Raise a pull request from branch A-fix against the original branch A.
  • Resolve conflicts within the pull request interface or locally before merging.
  • In Appsmith, discard and pull the changes into branch A.

See Resolve Merge Conflicts in Git

Maximum call size exceeded error​

Maximum call size exceeded

Cause​

This error is due to the size limit on the merge operation being exceeded, possibly from large files or too many changes.

Solution​

Split the merge operation into smaller chunks and remove any unnecessary large files from the repository.

Private repo limit error​

Private Repo Limit Error

Cause​

This occurs due to restrictions on the number of private repositories that can be connected.

Solution​

In the community edition, you can only connect to 3 private repositories. If you want to connect more private repositories, you must upgrade to a paid plan. For more information, see Pricing.

CI/CD deployment failed - missing packages​

AE-GIT-5002: Deployment aborted to protect the last successful version as the artifact is in an invalid state. Details: Module instances exist without the necessary packages/modules in the current workspace. Please resolve the missing dependencies first.

Cause​

This error occurs when CI/CD fails because the application uses Packages that are not present in the workspace where the CI/CD is being triggered. The deployment is aborted to protect the last successful version.

Solution​

To resolve this:

  1. Ensure that all Packages used by the application are imported into the workspace of the application for which CI/CD is being triggered.

  2. If the issue continues to happen despite importing all Packages, reconfigure the bearer token from the CI/CD settings of the application and use the new bearer token in your CI/CD API. This is required because older bearer tokens may not have the necessary permissions to resolve Package dependencies.

For more information, see CI/CD with Git-Connected Apps and Packages.

Edit and view mode out of sync​

Cause​

In some cases, an issue can occur where the latest changes have been pulled to the edit mode of the application, but the deployment to view mode failed. This results in edit mode and view mode being out of sync, with no more commits to be pushed.

Solution​

When edit and view mode are out of sync and there are no more changes to be committed, you will see the Deploy button on the top right of the editor displaying an orange notification dot. When you hover over it, a tooltip will appear stating "Redeploy needed to sync changes from edit mode." To resolve this:

  1. Open the Git commit modal by clicking the Deploy button on the top right of the editor.
  2. Click the Redeploy button in the Git modal to synchronize the changes from edit mode to view mode.
Redeploy app
Redeploy app

Git connection lost after restart​

Cause​

On self-hosted instances without a persistent volume, the local Git repository clones are stored on ephemeral container storage. When the Appsmith container or instance is restarted, the cloned repositories are wiped, and the app is no longer able to reconnect to its Git repository.

Solution​

  • Configure a persistent volume for your deployment so that Git repositories are maintained across restarts.
  • Set the APPSMITH_GIT_ROOT environment variable to a directory on the persistent volume so repositories are created and persisted. See Git Local File Path.
  • If issues persist, contact support for assistance.

SSHKey error when connecting to a repository​

SSHKey error

Cause​

Appsmith connects to Git over SSH using deploy keys. This error typically appears when the instance cannot reach the Git provider over the network, due to firewall rules, security group settings, or proxy configuration blocking outbound traffic, rather than the key itself being missing.

Solution​

  • Verify network connectivity from the Appsmith host to the Git provider, including firewall rules, security group settings, and any proxy configuration that may restrict outbound traffic.
  • From an affected node, test basic connectivity and HTTPS port reachability, for example ping github.com and telnet github.com 443.
  • If a proxy is in use, test connectivity with the proxy disabled to isolate the cause.
  • Confirm you are using the SSH repository URL with a deploy key. HTTPS Git connections are not supported. See Setup GitHub.
  • If issues persist, contact support for assistance.

Unable to populate branches / file system lock error​

Git command execution error: We were unable to place a lock on the file system to perform status command. This error can occur when another command listBranch, which is in progress.

Cause​

A concurrent Git operation holds a lock on the file system, preventing other Git commands (such as listing branches) from completing. This can surface after upgrading the instance.

Solution​

  • As an instance admin, enable Atomic pushes in the instance settings (only visible to instance admins).
  • If issues persist, contact support for assistance.

Version mismatch when pulling between environments​

Cause​

When a development environment runs a newer Appsmith version than a higher environment (such as staging or production), pulling changes from the newer environment into the older one fails with a version mismatch. This is expected behavior.

Solution​

  • Update the other environment to the same Appsmith version (or higher) so the Git operation succeeds.
  • Keep all environments connected to the same repository on the same Appsmith version to avoid version-related Git conflicts. See Continuous Delivery (CI/CD) with Git.

Discard local changes fails or changes reappear​

AE-GIT-4044: git discard failed. Details: Please create a new branch and resolve conflicts in the remote repository before proceeding.
Unexpected character ('<' (code 60)): was expecting double-quote to start field name

You may see one of these errors when you click Discard & pull, or the discard may appear to succeed while the same uncommitted changes keep coming back. Other signs of this problem include:

  • Git status shows nothing to pull or push (the branch is not ahead or behind the remote) and no conflicts, but the app still has uncommitted changes.
  • Pages, queries, or datasources that exist in the remote repository are listed as removed in the Git modal.

Cause​

To discard changes, Appsmith resets the branch to the remote and then rebuilds the app from the files in the repository. If any file can't be read back into an app, the rebuild fails and the discard fails with it. Despite the wording of the AE-GIT-4044 message, the cause is usually not a Git conflict, so creating a new branch doesn't fix it on its own.

The repository files are generated by Appsmith and must keep the structure Appsmith expects. A file becomes unreadable when it is changed outside Appsmith, for example when:

  • A merge conflict is resolved by hand in an editor or in your Git provider, and conflict markers (<<<<<<<, =======, >>>>>>>) or broken JSON are left in a file.
  • Pages, queries, JS objects, widgets, or datasources are created or edited directly in the repository, by hand or with scripts or AI tools.
  • A file is valid JSON but has the wrong shape. For example, a property that Appsmith stores as an object ({ }) is written as a list ([ ]), or a required property is missing. A JSON validator doesn't catch these mistakes.
  • The branch history is rewritten with a force-push outside Appsmith.

Solution​

  1. Look at what changed in the repository outside Appsmith since the last commit made from Appsmith. Files that were added or edited directly in the repository, or that went through a manual conflict resolution, are the most likely cause. For syntax errors, the error message names the file, line, and column (for example, pages/<PageName>/<PageName>.json).
  2. Fix the file on the remote. Either remove the conflict markers and correct the JSON, or compare the file with a similar one that Appsmith generated and match its structure. If you can't find the problem, revert the commits that added or changed the file outside Appsmith. Then commit and push the fix to the remote branch.
  3. In Appsmith, click Discard & pull again.
  4. If you don't need the changes on the affected branch, you can instead create a new branch from a branch that works, such as your default branch. Recreate the pages, queries, or datasources in the Appsmith editor and commit from Appsmith. This doesn't affect other branches.
  5. If the discard still fails, contact support and include the error message, the branch name, and the time of the failed attempt so the team can find the underlying error in the server logs.
caution

Make changes to pages, queries, JS objects, and datasources in the Appsmith editor, and commit them from Appsmith. Editing these files directly in the repository is not supported and can leave the app in a state that Appsmith can't load. Resolve merge conflicts by following Resolve Merge Conflicts in Git.