Difference between revisions of "Talk:Gitea"

From ArchWiki
Jump to navigation Jump to search
(thx for signing notice, strk at #gitea (freenode) noted the superuser option + sockets for better security)
m (learned how to sign and minor edits)
Line 3: Line 3:
 
Install and configure and start the [[PostgreSQL]], then do this to create gitea user and db:
 
Install and configure and start the [[PostgreSQL]], then do this to create gitea user and db:
  
Switch to posgres user:
+
1. Switch to posgres user:
 
  $ sudo -u postgres -i
 
  $ sudo -u postgres -i
Start create db wizzard:
+
2. Start create db wizzard ('''TODO''' add explanation why not superuser):
 
  [postgres]$ createuser --interactive
 
  [postgres]$ createuser --interactive
name gitea, superuser: no (TODO add explanation why not superuser)
+
name: gitea
then createdb named gitea using gitea user (its ok to launch the createdb command as regular user as well)
+
superuser: no
 +
 
 +
3. then createdb named gitea using gitea user (its ok to launch the createdb command as regular user as well)
 
  [postgres]$ createdb gitea -U gitea
 
  [postgres]$ createdb gitea -U gitea
then try access the the DB via localhost, cause that's how the gittea will try to access it
+
4. then try access the the DB via localhost, cause that's how the gittea will try to access it
 
  [postgres]$ psql -d gitea -U gitea -h 127.0.0.1 -W (connect to gitea db as gitea user, host localhost and -W without anything for empty password)
 
  [postgres]$ psql -d gitea -U gitea -h 127.0.0.1 -W (connect to gitea db as gitea user, host localhost and -W without anything for empty password)
  
Line 28: Line 30:
  
  
TODO setup a password, SSL_MODE wanted?
+
* TODO setup a password, SSL_MODE wanted?
TODO using localhost:port might be unsecure, better to connect directly at the socket (in "/run/postgresql");
+
* TODO using localhost:port might be unsecure, better to connect directly at the socket (in "/run/postgresql");
(try connecting to db psql -d gitea -U gitea and typing \conninfo for details)
+
** (try connecting to db psql -d gitea -U gitea and typing \conninfo for details)
  
--{{Unsigned|22 June 2018‎|Pulec}}
+
[[User:Pulec|Pulec]] ([[User talk:Pulec|talk]]) 01:00, 2 July 2018 (UTC)
  
 
:Please sign your posts. :)
 
:Please sign your posts. :)
 
:Any recommendations from Gitea/Gogs for setting up PostgreSQL?
 
:Any recommendations from Gitea/Gogs for setting up PostgreSQL?
 
:[[User:Francoism|Francoism]] ([[User talk:Francoism|talk]]) 09:38, 24 June 2018 (UTC)
 
:[[User:Francoism|Francoism]] ([[User talk:Francoism|talk]]) 09:38, 24 June 2018 (UTC)

Revision as of 01:00, 2 July 2018

PostgreSQL draft

Install and configure and start the PostgreSQL, then do this to create gitea user and db:

1. Switch to posgres user:

$ sudo -u postgres -i

2. Start create db wizzard (TODO add explanation why not superuser):

[postgres]$ createuser --interactive
name: gitea
superuser: no

3. then createdb named gitea using gitea user (its ok to launch the createdb command as regular user as well)

[postgres]$ createdb gitea -U gitea

4. then try access the the DB via localhost, cause that's how the gittea will try to access it

[postgres]$ psql -d gitea -U gitea -h 127.0.0.1 -W (connect to gitea db as gitea user, host localhost and -W without anything for empty password)

Now to edit the /etc/gitea/app.ini

Default PostgreSQL port is 5432 if you haven't changed it

/etc/gitea/app.ini
[database]
DB_TYPE = postgres
HOST = 127.0.0.1;5432
NAME = gitea
PASSWD = 
USER = postgres
SSL_MODE = disable


  • TODO setup a password, SSL_MODE wanted?
  • TODO using localhost:port might be unsecure, better to connect directly at the socket (in "/run/postgresql");
    • (try connecting to db psql -d gitea -U gitea and typing \conninfo for details)

Pulec (talk) 01:00, 2 July 2018 (UTC)

Please sign your posts. :)
Any recommendations from Gitea/Gogs for setting up PostgreSQL?
Francoism (talk) 09:38, 24 June 2018 (UTC)