Unable to add Git repository: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database

Created:

2017-03-27 20:01:38 UTC

Modified:

2017-08-08 13:44:20 UTC

0

Was this article helpful?


Have more questions?

Submit a request

Unable to add Git repository: SQLSTATE[HY000]: General error: 8 attempt to write a readonly database

Applicable to:

  • Plesk Onyx for Linux

Symptoms

When adding Git repository to a domain, the following error is show in Plesk interface:

Deploying files to example.com
SQLSTATE[HY000]:
General error: 8 attempt to write a readonly database,
query was: INSERT INTO "Repositories" ("domainId", "name", "type", "deploymentMode", "branch", "deploymentPath", "fetchUrl", "uuid", "skipSslVerification") VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?)

Cause

Insufficient permissions on the Git extension internal database /usr/local/psa/var/modules/git/git_db.db .

Resolution

  1. Set the correct permissions on the internal database file:

    # chown psaadm:root /usr/local/psa/var/modules/git/git_db.db
    # chmod 600 /usr/local/psa/var/modules/git/git_db.db
  2. Clear the Repositories table of the internal database:

    # sqlite3 /usr/local/psa/var/modules/git/git_db.db
    sqlite> delete from Repositories;
Have more questions? Submit a request
Please sign in to leave a comment.