Commit 7591718ef206fcf3f0c4380b2d8928e1258d37a0

Authored by Riyad Preukschas
1 parent 78d3611e

Consistently use sudo -u foo -H

Showing 1 changed file with 11 additions and 11 deletions   Show diff stats
doc/install/installation.md
@@ -83,21 +83,21 @@ Add your users to groups: @@ -83,21 +83,21 @@ Add your users to groups:
83 83
84 Generate key: 84 Generate key:
85 85
86 - sudo -H -u gitlab ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa 86 + sudo -u gitlab -H ssh-keygen -q -N '' -t rsa -f /home/gitlab/.ssh/id_rsa
87 87
88 88
89 # 4. Gitolite 89 # 4. Gitolite
90 90
91 Clone GitLab's fork of the Gitolite source code: 91 Clone GitLab's fork of the Gitolite source code:
92 92
93 - sudo -H -u git git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite 93 + sudo -u git -H git clone -b gl-v304 https://github.com/gitlabhq/gitolite.git /home/git/gitolite
94 94
95 Setup: 95 Setup:
96 96
97 cd /home/git 97 cd /home/git
98 sudo -u git -H mkdir bin 98 sudo -u git -H mkdir bin
99 - sudo -u git sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'  
100 - sudo -u git sh -c 'gitolite/install -ln /home/git/bin' 99 + sudo -u git -H sh -c 'echo -e "PATH=\$PATH:/home/git/bin\nexport PATH" >> /home/git/.profile'
  100 + sudo -u git -H sh -c 'gitolite/install -ln /home/git/bin'
101 101
102 sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub 102 sudo cp /home/gitlab/.ssh/id_rsa.pub /home/git/gitlab.pub
103 sudo chmod 0444 /home/git/gitlab.pub 103 sudo chmod 0444 /home/git/gitlab.pub
@@ -107,7 +107,7 @@ Setup: @@ -107,7 +107,7 @@ Setup:
107 107
108 Permissions: 108 Permissions:
109 109
110 - sudo chmod -R g+rwX /home/git/repositories/ 110 + sudo chmod -R ug+rwXs /home/git/repositories/
111 sudo chown -R git:git /home/git/repositories/ 111 sudo chown -R git:git /home/git/repositories/
112 112
113 # clone admin repo to add localhost to known_hosts 113 # clone admin repo to add localhost to known_hosts
@@ -135,11 +135,11 @@ See doc/install/databases.md @@ -135,11 +135,11 @@ See doc/install/databases.md
135 #### Get source code 135 #### Get source code
136 136
137 # Get gitlab code. Use this for stable setup 137 # Get gitlab code. Use this for stable setup
138 - sudo -H -u gitlab git clone -b stable https://github.com/gitlabhq/gitlabhq.git gitlab 138 + sudo -u gitlab -H git clone -b stable https://github.com/gitlabhq/gitlabhq.git gitlab
139 139
140 # Skip this for stable setup. 140 # Skip this for stable setup.
141 # Master branch (recent changes, less stable) 141 # Master branch (recent changes, less stable)
142 - sudo -H -u gitlab git clone -b master https://github.com/gitlabhq/gitlabhq.git gitlab 142 + sudo -u gitlab -H git clone -b master https://github.com/gitlabhq/gitlabhq.git gitlab
143 143
144 144
145 #### Copy configs 145 #### Copy configs
@@ -148,11 +148,11 @@ See doc/install/databases.md @@ -148,11 +148,11 @@ See doc/install/databases.md
148 148
149 # Rename config files 149 # Rename config files
150 # 150 #
151 - sudo -u gitlab cp config/gitlab.yml.example config/gitlab.yml 151 + sudo -u gitlab -H cp config/gitlab.yml.example config/gitlab.yml
152 152
153 # Copy unicorn config 153 # Copy unicorn config
154 # 154 #
155 - sudo -u gitlab cp config/unicorn.rb.example config/unicorn.rb 155 + sudo -u gitlab -H cp config/unicorn.rb.example config/unicorn.rb
156 156
157 #### Install gems 157 #### Install gems
158 158
@@ -172,7 +172,7 @@ Git requires a username and email in order to be able to do that. @@ -172,7 +172,7 @@ Git requires a username and email in order to be able to do that.
172 172
173 #### Setup application 173 #### Setup application
174 174
175 - sudo -u gitlab bundle exec rake gitlab:app:setup RAILS_ENV=production 175 + sudo -u gitlab -H bundle exec rake gitlab:app:setup RAILS_ENV=production
176 176
177 177
178 #### Setup GitLab hooks 178 #### Setup GitLab hooks
@@ -184,7 +184,7 @@ Git requires a username and email in order to be able to do that. @@ -184,7 +184,7 @@ Git requires a username and email in order to be able to do that.
184 184
185 Checking status: 185 Checking status:
186 186
187 - sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production 187 + sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
188 188
189 189
190 # OUTPUT EXAMPLE 190 # OUTPUT EXAMPLE