Commit a3731cf3623f181e25113ebbb2415d7dddb630b2

Authored by Jacob Vosmaer
1 parent 485162ec

Use peer-based authentication for PostgreSQL

config/database.yml.postgresql
... ... @@ -6,8 +6,8 @@ production:
6 6 encoding: unicode
7 7 database: gitlabhq_production
8 8 pool: 10
9   - username: git
10   - password:
  9 + # username: git
  10 + # password:
11 11 # host: localhost
12 12 # port: 5432
13 13 # socket: /tmp/postgresql.sock
... ...
doc/install/databases.md
... ... @@ -58,7 +58,7 @@ GitLab supports the following databases:
58 58 sudo -u postgres psql -d template1
59 59  
60 60 # Create a user for GitLab. (change $password to a real password)
61   - template1=# CREATE USER git WITH PASSWORD '$password';
  61 + template1=# CREATE USER git;
62 62  
63 63 # Create the GitLab production database & grant all privileges on database
64 64 template1=# CREATE DATABASE gitlabhq_production OWNER git;
... ...
doc/install/installation.md
... ... @@ -216,17 +216,18 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
216 216 # Mysql
217 217 sudo -u git cp config/database.yml.mysql config/database.yml
218 218  
219   - or
220   -
221   - # PostgreSQL
222   - sudo -u git cp config/database.yml.postgresql config/database.yml
223   -
224 219 # Make sure to update username/password in config/database.yml.
225 220 # You only need to adapt the production settings (first part).
226 221 # If you followed the database guide then please do as follows:
227 222 # Change 'secure password' with the value you have given to $password
228 223 # You can keep the double quotes around the password
229 224 sudo -u git -H editor config/database.yml
  225 +
  226 + or
  227 +
  228 + # PostgreSQL
  229 + sudo -u git cp config/database.yml.postgresql config/database.yml
  230 +
230 231  
231 232 # Make config/database.yml readable to git only
232 233 sudo -u git -H chmod o-rwx config/database.yml
... ...