@@ -20,7 +20,7 @@ or you can run the following command
20
20
groupmod -g 500 git
21
21
```
22
22
23
- Amended the ` /etc/passwd ` file to change the uid, gid and the home directory for git
23
+ Amend the ` /etc/passwd ` file to change the uid, gid and the home directory for git
24
24
25
25
``` bash
26
26
git:x:500:500:GitLab,,,:/var/lib/git:/bin/bash
@@ -31,7 +31,7 @@ or you can run the following command
31
31
usermod -d /var/lib/git -g 500 -u 500 git
32
32
```
33
33
34
- ### 2. Move the git folder
34
+ ### 2. Copy the git folder
35
35
36
36
``` bash
37
37
cp -r /home/git /var/lib/
@@ -44,7 +44,8 @@ chown -R git:git /var/lib/git
44
44
```
45
45
46
46
### 4. Update Gitlab config files
47
- update ` ~git/gitlab/config/gitlab.yml ` , using the following command
47
+
48
+ Update ` ~git/gitlab/config/gitlab.yml ` , using the following command
48
49
49
50
``` bash
50
51
sed -i -e ' s/\/home/\/var\/lib/g' ~ git/gitlab/config/gitlab.yml
@@ -123,7 +124,8 @@ You should see the following difference after running the command
123
124
```
124
125
125
126
### 5. Update Gitlab shell config file
126
- update ` ~git/gitlab-shell/config.yml ` , using the following command
127
+
128
+ Update ` ~git/gitlab-shell/config.yml ` , using the following command
127
129
128
130
``` bash
129
131
sed -i -e ' s/\/home/\/var\/lib/g' ~ git/gitlab-shell/config.yml
@@ -159,7 +161,7 @@ sed -i -e 's/\/home/\/var\/lib/g' ~git/.ssh/authorized_keys
159
161
160
162
### 7. Update nginx config file
161
163
162
- update ` /etc/nginx/sites-enabled/gitlab ` , using the following command
164
+ Update ` /etc/nginx/sites-enabled/gitlab ` , using the following command
163
165
164
166
``` bash
165
167
sed -i -e ' s/\/home/\/var\/lib/g' /etc/nginx/sites-enabled/gitlab
@@ -206,16 +208,22 @@ sudo service nginx restart
206
208
207
209
Check if GitLab and its environment are configured correctly:
208
210
209
- cd ~git/gitlab
210
- sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
211
+ ``` bash
212
+ cd ~ git/gitlab
213
+ sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
214
+ ```
211
215
212
216
To make sure you didn't miss anything run a more thorough check with:
213
217
214
- cd ~git/gitlab
215
- sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
218
+ ``` bash
219
+ cd ~ git/gitlab
220
+ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
221
+ ```
216
222
217
223
### 14. Remove old home
218
224
219
225
Once you are happy that everything is now working in the new directory, you can remove the old ` /home/git `
220
226
221
- rm -rf /home/git
227
+ ``` bash
228
+ rm -rf /home/git
229
+ ```
0 commit comments