Plesk

Unable to open Git extension in Plesk: A table must have a primary key, but none was found for table ‘DeployKeys’

Symptoms

Cause

The table DeployKeys is missing from the database of the Git extension.

Resolution

  1. Connect to the Plesk server via SSH.

  2. Recreate the table using one of the following ways:

    • reinstall the extension:

      # plesk bin extension --uninstall git

      # plesk bin extension --install git

    • recreate the table manually:

      # sqlite3 /usr/local/psa/var/modules/git/git_db.db "CREATE TABLE 'DeployKeys' ( 'id' INTEGER NOT NULL PRIMARY KEY AUTOINCREMENT, 'uuid' varchar(36) NOT NULL, 'domainUuid' varchar(36) NOT NULL, 'name' varchar(255) NOT NULL, 'isDefault' int(1) NOT NULL DEFAULT '0');"