First install with PG10 fails


I’ve got a problem with a new installation, from binary 1.11.3, on Ubuntu 18 LTS with a PostgreSQL 10 database.

I’ve followed the official instructions for this type of installation, except that /var/lib/gitea and /etc/gitea are symlinks to ~/var/gitea and ~/etc/gitea
I have to do this because of my enterprise environnement rules, but I’ve put the recursive rights and owners as described in the Gitea documentation.

Here is my start procedure :

git@…:~/product/gitea/1.11.3$ GITEA_WORK_DIR=/var/lib/gitea/ ./gitea web -c /etc/gitea/app.ini -p 8080

The web page is ok (with Apache 2.4.29), then I go to Explore to have the web installation page.
I fill the required fields, then some facultative ones and click on Install.

All seems to be ok, tables and objects are created in the database, and the last on-screen message is :

2020/03/30 14:19:50 …dules/setting/git.go:91:newGit() [I] Git Version: 2.17.1

And in the /home/git/var/lib/gitea/log/gitea.log file, I’ve got this error :

2020/03/30 14:19:50 routers/init.go:72:initDBEngine() [E] ORM engine initialization attempt #1/10 failed. Error: migrate: sync: pq: column “id” of relation “version” already exists

I’ve got 10 attemps before le script exits and the webpage asks me to leave or stay on itself.

Can you help me ?

Hi, this looks like you made a couple of installation attempts and one of them left the database half-created. Now Gitea thinks you’re upgrading when in fact you’re not. I’d suggest you drop and recreate the database and try again.

Hi @guillep2k.

Thanks for the answer. I’ve already tried a few times and before opening this thread, I’ve done what you asked :

  • Clean and delete all directories created for gitea
  • Drop database and instance Postgres
  • Recreate all

Maybe a option in the app.ini file to deactivate the upgrade mode ?