Articles in this section

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

Plesk for Linux kb: technical

Applicable to:

  • Plesk for Linux

Symptoms

  • When clicking Git in domain's dashboard, the page fails to load with the error message:

    CONFIG_TEXT: 500 Zend_Db_Table_Exception
    A table must have a primary key, but none was found for table 'DeployKeys'

  • Plesk backup finishes with the warning:

    PLESK_WARN: Warning: Extension "Git"
    Unable to back up extension. Error: Failed to exec backup_restore_helper: Exit code: 3: A table must have a primary key, but none was found for table 'DeployKeys'

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');"

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.