welcome/install page sqlite path textbox default should be absolute #1503

Closed
opened 2025-11-02 04:03:00 -06:00 by GiteaMirror · 2 comments
Owner

Originally created by @siochs on GitHub (Feb 5, 2018).

  • Gitea version (or commit ref): Gitea vb16c84d built with: bindata, sqlite
  • Git version: 2.11.0
  • Operating system: Debian GNU/Linux 9 (stretch)
  • Database (use [x]):
    • PostgreSQL
    • MySQL
    • MSSQL
    • SQLite
  • Can you reproduce the bug at https://try.gitea.io:
    • Yes (provide example URL)
    • No
    • Not relevant
  • Log gist:

Description

On Server:

$GiteaHome=/local/gitea
useradd -r -s /bin/bash -d $GiteaHome -m git
wget https://dl.gitea.io/gitea/master/gitea-master-linux-amd64 -O $GiteaHome/bin/gitea
chmod +x $GiteaHome/bin/gitea
chown -R git:git $GiteaHome
$GiteaHome/bin/gitea web

Browse welcome page, select SQLite and leave all the defaults. Create a rummy repo called testrepo. Add a public key for ssh authentication in Administration page. Then try this on the client:

git clone git@myserver:myuser/testrepo.git .
Cloning into '.'...
Gitea: Internal error
Failed to get repository: no such table: repository
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.

This error can be fixed by editing /local/gitea/bin/custom/conf/app.ini

[database]
DB_TYPE  = sqlite3
HOST     = 127.0.0.1:3306
NAME     = gitea
USER     = gitea
PASSWD   =
SSL_MODE = disable
PATH     = /local/gitea/data/gitea.db (<- was data/gitea.db)

Well, this is not really a bug. But I think it would be nice to have the absolute path as default in the textbox for the database path on the welcome/install page:
image

Note

This does not happen when running from docker:

docker run -p 3000:3000 gitea/gitea:latest

image

Originally created by @siochs on GitHub (Feb 5, 2018). <!-- 1. Please speak English, this is the language all of us can speak and write. 2. Please ask questions or configuration/deploy problems on our Discord server (https://discord.gg/NsatcWJ) or forum (https://discourse.gitea.io). 3. Please take a moment to check that your issue doesn't already exist. 4. Please give all relevant information below for bug reports, because incomplete details will be handled as an invalid report. --> - Gitea version (or commit ref): Gitea vb16c84d built with: bindata, sqlite - Git version: 2.11.0 - Operating system: Debian GNU/Linux 9 (stretch) - Database (use `[x]`): - [ ] PostgreSQL - [ ] MySQL - [ ] MSSQL - [x] SQLite - Can you reproduce the bug at https://try.gitea.io: - [ ] Yes (provide example URL) - [ ] No - [x] Not relevant - Log gist: ## Description On Server: ```bash $GiteaHome=/local/gitea useradd -r -s /bin/bash -d $GiteaHome -m git wget https://dl.gitea.io/gitea/master/gitea-master-linux-amd64 -O $GiteaHome/bin/gitea chmod +x $GiteaHome/bin/gitea chown -R git:git $GiteaHome $GiteaHome/bin/gitea web ``` Browse welcome page, select SQLite and leave all the defaults. Create a rummy repo called testrepo. Add a public key for ssh authentication in Administration page. Then try this on the client: ```bash git clone git@myserver:myuser/testrepo.git . Cloning into '.'... Gitea: Internal error Failed to get repository: no such table: repository fatal: Could not read from remote repository. Please make sure you have the correct access rights and the repository exists. ``` This error can be fixed by editing /local/gitea/bin/custom/conf/app.ini ``` [database] DB_TYPE = sqlite3 HOST = 127.0.0.1:3306 NAME = gitea USER = gitea PASSWD = SSL_MODE = disable PATH = /local/gitea/data/gitea.db (<- was data/gitea.db) ``` Well, this is not really a bug. But I think it would be nice to have the absolute path as default in the textbox for the database path on the welcome/install page: ![image](https://user-images.githubusercontent.com/5244312/35808018-d1997042-0a84-11e8-8485-1b3f0ddc8d4f.png) ## Note This does not happen when running from docker: ``` docker run -p 3000:3000 gitea/gitea:latest ``` ![image](https://user-images.githubusercontent.com/5244312/35808094-0e0b95fa-0a85-11e8-8e97-92ce476dd905.png)
GiteaMirror added the type/proposal label 2025-11-02 04:03:00 -06:00
Author
Owner

@thehowl commented on GitHub (Mar 3, 2018):

I disagree. Having a relative path is actually useful if moving gitea (its entire directory) to a new folder, or migrating the server. The docker image already handles the case and uses an absolute path from the configuration specified in the dockerfile.

@thehowl commented on GitHub (Mar 3, 2018): I disagree. Having a relative path is actually useful if moving gitea (its entire directory) to a new folder, or migrating the server. The docker image already handles the case and uses an absolute path from the configuration specified in the dockerfile.
Author
Owner

@techknowlogick commented on GitHub (Apr 12, 2022):

This is now the case

@techknowlogick commented on GitHub (Apr 12, 2022): This is now the case
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/gitea#1503