Commit fd348de76d651d49acc8eb742cc647dc777ef5fc

Authored by Ciro Santilli
1 parent de1a7aa7

Update docs to markdown style guide.

Showing 88 changed files with 1352 additions and 1414 deletions   Show diff stats
CONTRIBUTING.md
@@ -24,16 +24,11 @@ Issues and merge requests should be in English and contain appropriate language @@ -24,16 +24,11 @@ Issues and merge requests should be in English and contain appropriate language
24 24
25 To get support for your particular problem please use the channels as detailed in the [getting help section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#getting-help). Professional [support subscriptions](http://www.gitlab.com/subscription/) and [consulting services](http://www.gitlab.com/consultancy/) are available from [GitLab.com](http://www.gitlab.com/). 25 To get support for your particular problem please use the channels as detailed in the [getting help section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#getting-help). Professional [support subscriptions](http://www.gitlab.com/subscription/) and [consulting services](http://www.gitlab.com/consultancy/) are available from [GitLab.com](http://www.gitlab.com/).
26 26
27 -The [issue tracker](https://gitlab.com/gitlab-org/gitlab-ce/issues) is only for obvious errors in the latest [stable or development release of GitLab](MAINTENANCE.md).  
28 -If something is wrong but it is not a regression compared to older versions of GitLab please do not open an issue but a feature request.  
29 -When submitting an issue please conform to the issue submission guidelines listed below.  
30 -Not all issues will be addressed and your issue is more likely to be addressed if you submit a merge request which partially or fully addresses the issue. 27 +The [issue tracker](https://gitlab.com/gitlab-org/gitlab-ce/issues) is only for obvious errors in the latest [stable or development release of GitLab](MAINTENANCE.md). If something is wrong but it is not a regression compared to older versions of GitLab please do not open an issue but a feature request. When submitting an issue please conform to the issue submission guidelines listed below. Not all issues will be addressed and your issue is more likely to be addressed if you submit a merge request which partially or fully addresses the issue.
31 28
32 Issues can be filed either at [gitlab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues) or [github.com](https://github.com/gitlabhq/gitlabhq/issues). 29 Issues can be filed either at [gitlab.com](https://gitlab.com/gitlab-org/gitlab-ce/issues) or [github.com](https://github.com/gitlabhq/gitlabhq/issues).
33 30
34 -Do not use the issue tracker for feature requests.  
35 -We have a specific [feature request forum](http://feedback.gitlab.com) for this purpose.  
36 -Please keep feature requests as small and simple as possible, complex ones might be edited to make them small and simple. 31 +Do not use the issue tracker for feature requests. We have a specific [feature request forum](http://feedback.gitlab.com) for this purpose. Please keep feature requests as small and simple as possible, complex ones might be edited to make them small and simple.
37 32
38 Please send a merge request with a tested solution or a merge request with a failing test instead of opening an issue if you can. If you're unsure where to post, post to the [mailing list](https://groups.google.com/forum/#!forum/gitlabhq) or [Stack Overflow](http://stackoverflow.com/questions/tagged/gitlab) first. There are a lot of helpful GitLab users there who may be able to help you quickly. If your particular issue turns out to be a bug, it will find its way from there. 33 Please send a merge request with a tested solution or a merge request with a failing test instead of opening an issue if you can. If you're unsure where to post, post to the [mailing list](https://groups.google.com/forum/#!forum/gitlabhq) or [Stack Overflow](http://stackoverflow.com/questions/tagged/gitlab) first. There are a lot of helpful GitLab users there who may be able to help you quickly. If your particular issue turns out to be a bug, it will find its way from there.
39 34
@@ -42,16 +37,16 @@ Please send a merge request with a tested solution or a merge request with a fai @@ -42,16 +37,16 @@ Please send a merge request with a tested solution or a merge request with a fai
42 **[Search the issues](https://gitlab.com/gitlab-org/gitlab-ce/issues)** for similar entries before submitting your own, there's a good chance somebody else had the same issue. Show your support with `:+1:` and/or join the discussion. Please submit issues in the following format (as the first post): 37 **[Search the issues](https://gitlab.com/gitlab-org/gitlab-ce/issues)** for similar entries before submitting your own, there's a good chance somebody else had the same issue. Show your support with `:+1:` and/or join the discussion. Please submit issues in the following format (as the first post):
43 38
44 1. **Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen) 39 1. **Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen)
45 -2. **Steps to reproduce:** How can we reproduce the issue, preferably on the [GitLab development virtual machine with vagrant](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/doc/development.md) (start your issue with: `vagrant destroy && vagrant up && vagrant ssh`)  
46 -3. **Expected behavior:** Describe your issue in detail  
47 -4. **Observed behavior**  
48 -5. **Relevant logs and/or screenshots:** Please use code blocks (\`\`\`) to format console output, logs, and code as it's very hard to read otherwise.  
49 -6. **Output of checks** 40 +1. **Steps to reproduce:** How can we reproduce the issue, preferably on the [GitLab development virtual machine with vagrant](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/doc/development.md) (start your issue with: `vagrant destroy && vagrant up && vagrant ssh`)
  41 +1. **Expected behavior:** Describe your issue in detail
  42 +1. **Observed behavior**
  43 +1. **Relevant logs and/or screenshots:** Please use code blocks (\`\`\`) to format console output, logs, and code as it's very hard to read otherwise.
  44 +1. **Output of checks**
50 * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production`); we will only investigate if the tests are passing 45 * Results of GitLab [Application Check](doc/install/installation.md#check-application-status) (`sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production`); we will only investigate if the tests are passing
51 * Version of GitLab you are running; we will only investigate issues in the latest stable and development releases as per the [maintenance policy](MAINTENANCE.md) 46 * Version of GitLab you are running; we will only investigate issues in the latest stable and development releases as per the [maintenance policy](MAINTENANCE.md)
52 * Add the last commit sha1 of the GitLab version you used to replicate the issue (obtainable from the help page) 47 * Add the last commit sha1 of the GitLab version you used to replicate the issue (obtainable from the help page)
53 * Describe your setup (use relevant parts from `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`) 48 * Describe your setup (use relevant parts from `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
54 -7. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem 49 +1. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem
55 50
56 ## Merge requests 51 ## Merge requests
57 52
@@ -87,10 +82,10 @@ For examples of feedback on merge requests please look at already [closed merge @@ -87,10 +82,10 @@ For examples of feedback on merge requests please look at already [closed merge
87 **Please format your merge request description as follows:** 82 **Please format your merge request description as follows:**
88 83
89 1. What does this MR do? 84 1. What does this MR do?
90 -2. Are there points in the code the reviewer needs to double check?  
91 -3. Why was this MR needed?  
92 -4. What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?  
93 -5. Screenshots (If appropiate) 85 +1. Are there points in the code the reviewer needs to double check?
  86 +1. Why was this MR needed?
  87 +1. What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?
  88 +1. Screenshots (If appropiate)
94 89
95 ## Contribution acceptance criteria 90 ## Contribution acceptance criteria
96 91
@@ -106,6 +101,7 @@ For examples of feedback on merge requests please look at already [closed merge @@ -106,6 +101,7 @@ For examples of feedback on merge requests please look at already [closed merge
106 1. It conforms to the following style guides 101 1. It conforms to the following style guides
107 102
108 ## Style guides 103 ## Style guides
  104 +
109 1. [Ruby](https://github.com/bbatsov/ruby-style-guide) 105 1. [Ruby](https://github.com/bbatsov/ruby-style-guide)
110 1. [Rails](https://github.com/bbatsov/rails-style-guide) 106 1. [Rails](https://github.com/bbatsov/rails-style-guide)
111 1. [Formatting](https://github.com/thoughtbot/guides/tree/master/style#formatting) 107 1. [Formatting](https://github.com/thoughtbot/guides/tree/master/style#formatting)
MAINTENANCE.md
1 # GitLab Maintenance Policy 1 # GitLab Maintenance Policy
2 2
3 -GitLab is a fast moving and evolving project. We currently don't have the  
4 -resources to support many releases concurrently. We support exactly one stable  
5 -release at any given time. 3 +GitLab is a fast moving and evolving project. We currently don't have the resources to support many releases concurrently. We support exactly one stable release at any given time.
6 4
7 -GitLab follows the [Semantic Versioning](http://semver.org/) for its releases:  
8 -`(Major).(Minor).(Patch)`. 5 +GitLab follows the [Semantic Versioning](http://semver.org/) for its releases: `(Major).(Minor).(Patch)`.
9 6
10 -* **Major version**: Whenever there is something significant or any backwards  
11 - incompatible changes are introduced to the public API.  
12 -* **Minor version**: When new, backwards compatible functionality is introduced  
13 - to the public API or a minor feature is introduced, or when a set of smaller  
14 - features is rolled out.  
15 -* **Patch number**: When backwards compatible bug fixes are introduced that fix  
16 - incorrect behavior. 7 +- **Major version**: Whenever there is something significant or any backwards incompatible changes are introduced to the public API.
  8 +- **Minor version**: When new, backwards compatible functionality is introduced to the public API or a minor feature is introduced, or when a set of smaller features is rolled out.
  9 +- **Patch number**: When backwards compatible bug fixes are introduced that fix incorrect behavior.
17 10
18 -The current stable release will receive security patches and bug fixes  
19 -(eg. `5.0` -> `5.0.1`). Feature releases will mark the next supported stable  
20 -release where the minor version is increased numerically by increments of one  
21 -(eg. `5.0 -> 5.1`). 11 +The current stable release will receive security patches and bug fixes (eg. `5.0` -> `5.0.1`). Feature releases will mark the next supported stable release where the minor version is increased numerically by increments of one (eg. `5.0 -> 5.1`).
22 12
23 We encourage everyone to run the latest stable release to ensure that you can easily upgrade to the most secure and feature rich GitLab experience. In order to make sure you can easily run the most recent stable release, we are working hard to keep the update process simple and reliable. 13 We encourage everyone to run the latest stable release to ensure that you can easily upgrade to the most secure and feature rich GitLab experience. In order to make sure you can easily run the most recent stable release, we are working hard to keep the update process simple and reliable.
24 14
@@ -24,9 +24,9 @@ Below we describe the contributing process to GitLab for two reasons. So that co @@ -24,9 +24,9 @@ Below we describe the contributing process to GitLab for two reasons. So that co
24 ## Priorities of the issue team 24 ## Priorities of the issue team
25 25
26 1. Mentioning people (critical) 26 1. Mentioning people (critical)
27 -2. Workflow labels (normal)  
28 -3. Functional labels (minor)  
29 -4. Assigning issues (avoid if possible) 27 +1. Workflow labels (normal)
  28 +1. Functional labels (minor)
  29 +1. Assigning issues (avoid if possible)
30 30
31 ## Mentioning people 31 ## Mentioning people
32 32
@@ -36,11 +36,11 @@ The most important thing is making sure valid issues receive feedback from the d @@ -36,11 +36,11 @@ The most important thing is making sure valid issues receive feedback from the d
36 36
37 Workflow labels are purposely not very detailed since that would be hard to keep updated as you would need to reevaluate them after every comment. We optionally use functional labels on demand when want to group related issues to get an overview (for example all issues related to RVM, to tackle them in one go) and to add details to the issue. 37 Workflow labels are purposely not very detailed since that would be hard to keep updated as you would need to reevaluate them after every comment. We optionally use functional labels on demand when want to group related issues to get an overview (for example all issues related to RVM, to tackle them in one go) and to add details to the issue.
38 38
39 -- _Awaiting feedback_: Feedback pending from the reporter  
40 -- _Awaiting confirmation of fix_: The issue should already be solved in **master** (generally you can avoid this workflow item and just close the issue right away)  
41 -- _Attached MR_: There is a MR attached and the discussion should happen there  
42 - - We need to let issues stay in sync with the MR's. We can do this with a "Closing #XXXX" or "Fixes #XXXX" comment in the MR. We can't close the issue when there is a merge request because sometimes a MR is not good and we just close the MR, then the issue must stay.  
43 -- _Awaiting developer action/feedback_: Issue needs to be fixed or clarified by a developer 39 +- *Awaiting feedback*: Feedback pending from the reporter
  40 +- *Awaiting confirmation of fix*: The issue should already be solved in **master** (generally you can avoid this workflow item and just close the issue right away)
  41 +- *Attached MR*: There is a MR attached and the discussion should happen there
  42 + - We need to let issues stay in sync with the MR's. We can do this with a "Closing #XXXX" or "Fixes #XXXX" comment in the MR. We can't close the issue when there is a merge request because sometimes a MR is not good and we just close the MR, then the issue must stay.
  43 +- *Awaiting developer action/feedback*: Issue needs to be fixed or clarified by a developer
44 44
45 ## Functional labels 45 ## Functional labels
46 46
@@ -51,12 +51,13 @@ These labels describe what development specialities are involved such as: Postgr @@ -51,12 +51,13 @@ These labels describe what development specialities are involved such as: Postgr
51 If an issue is complex and needs the attention of a specific person, assignment is a good option but assigning issues might discourage other people from contributing to that issue. We need all the contributions we can get so this should never be discouraged. Also, an assigned person might not have time for a few weeks, so others should feel free to takeover. 51 If an issue is complex and needs the attention of a specific person, assignment is a good option but assigning issues might discourage other people from contributing to that issue. We need all the contributions we can get so this should never be discouraged. Also, an assigned person might not have time for a few weeks, so others should feel free to takeover.
52 52
53 ## Label colors 53 ## Label colors
54 -- Light orange `#fef2c0`: workflow labels for issue team members (awaiting feedback, awaiting confirmation of fix)  
55 -- Bright orange `#eb6420`: workflow labels for core team members (attached MR, awaiting developer action/feedback)  
56 -- Light blue `#82C5FF`: functional labels  
57 -- Green labels `#009800`: issues that can generally be ignored. For example, issues given the following labels normally can be closed immediately:  
58 - - Feature request (see copy & paste response: [Feature requests](#feature-requests))  
59 - - Support (see copy & paste response: [Support requests and configuration questions](#support-requests-and-configuration-questions) 54 +
  55 +- Light orange `#fef2c0`: workflow labels for issue team members (awaiting feedback, awaiting confirmation of fix)
  56 +- Bright orange `#eb6420`: workflow labels for core team members (attached MR, awaiting developer action/feedback)
  57 +- Light blue `#82C5FF`: functional labels
  58 +- Green labels `#009800`: issues that can generally be ignored. For example, issues given the following labels normally can be closed immediately:
  59 + - Feature request (see copy & paste response: [Feature requests](#feature-requests))
  60 + - Support (see copy & paste response: [Support requests and configuration questions](#support-requests-and-configuration-questions)
60 61
61 ## Be kind 62 ## Be kind
62 63
@@ -102,8 +103,4 @@ This merge request has been closed because a request for more information has no @@ -102,8 +103,4 @@ This merge request has been closed because a request for more information has no
102 103
103 ### Accepting merge requests 104 ### Accepting merge requests
104 105
105 -Is there a request on [the feature request forum](http://feedback.gitlab.com/forums/176466-general) that is similar to this?  
106 -If so, can you make a comment with a link to it?  
107 -Please be aware that new functionality that is not marked [accepting merge/pull requests](http://feedback.gitlab.com/forums/176466-general/status/796455) on the forum might not make it into GitLab.  
108 -You might be asked to make changes and even after implementing them your feature might still be declined.  
109 -If you want to reduce the chance of this happening please have a discussion in the forum first. 106 +Is there a request on [the feature request forum](http://feedback.gitlab.com/forums/176466-general) that is similar to this? If so, can you make a comment with a link to it? Please be aware that new functionality that is not marked [accepting merge/pull requests](http://feedback.gitlab.com/forums/176466-general/status/796455) on the forum might not make it into GitLab. You might be asked to make changes and even after implementing them your feature might still be declined. If you want to reduce the chance of this happening please have a discussion in the forum first.
1 -## GitLab: self hosted Git management software 1 +# GitLab
  2 +
  3 +## Self hosted Git management software
2 4
3 ![logo](https://gitlab.com/gitlab-org/gitlab-ce/raw/master/public/gitlab_logo.png) 5 ![logo](https://gitlab.com/gitlab-org/gitlab-ce/raw/master/public/gitlab_logo.png)
4 6
5 ![animated-screenshots](https://gist.github.com/fnkr/2f9badd56bfe0ed04ee7/raw/4f48806fbae97f556c2f78d8c2d299c04500cb0d/compiled.gif) 7 ![animated-screenshots](https://gist.github.com/fnkr/2f9badd56bfe0ed04ee7/raw/4f48806fbae97f556c2f78d8c2d299c04500cb0d/compiled.gif)
6 8
7 -### Gitlab is open source software to collaborate on code 9 +## Open source software to collaborate on code
8 10
9 -* Manage git repositories with fine grained access controls that keep your code secure  
10 -* Perform code reviews and enhance collaboration with merge requests  
11 -* Each project can also have an issue tracker and a wiki  
12 -* Used by more than 100,000 organizations, GitLab is the most popular solution to manage git repositories on-premises  
13 -* Completely free and open source (MIT Expat license)  
14 -* Powered by Ruby on Rails 11 +- Manage Git repositories with fine grained access controls that keep your code secure
  12 +- Perform code reviews and enhance collaboration with merge requests
  13 +- Each project can also have an issue tracker and a wiki
  14 +- Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
  15 +- Completely free and open source (MIT Expat license)
  16 +- Powered by Ruby on Rails
15 17
16 -### Canonical source 18 +## Canonical source
17 19
18 -* The source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/) and there are mirrors to make [contributing](CONTRIBUTING.md) as easy as possible. 20 +- The source of GitLab Community Edition is [hosted on GitLab.com](https://gitlab.com/gitlab-org/gitlab-ce/) and there are mirrors to make [contributing](CONTRIBUTING.md) as easy as possible.
19 21
20 -### Code status 22 +## Code status
21 23
22 -* [![build status](https://ci.gitlab.org/projects/1/status.png?ref=master)](https://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) 24 +- [![build status](https://ci.gitlab.org/projects/1/status.png?ref=master)](https://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch)
23 25
24 -* [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq) 26 +- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
25 27
26 -* [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq) 28 +- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
27 29
28 -* [![PullReview stats](https://www.pullreview.com/gitlab/gitlab-org/gitlab-ce/badges/master.svg?)](https://www.pullreview.com/gitlab.gitlab.com/gitlab-org/gitlab-ce/reviews/master) 30 +- [![PullReview stats](https://www.pullreview.com/gitlab/gitlab-org/gitlab-ce/badges/master.svg?)](https://www.pullreview.com/gitlab.gitlab.com/gitlab-org/gitlab-ce/reviews/master)
29 31
30 ### Resources 32 ### Resources
31 33
32 -* [www.gitlab.com](https://www.gitlab.com/) includes information about [subscriptions](https://www.gitlab.com/subscription/), [consultancy](https://www.gitlab.com/consultancy/), the [community](https://www.gitlab.com/community/) and the [hosted GitLab.com](https://www.gitlab.com/gitlab-com/). 34 +- [www.gitlab.com](https://www.gitlab.com/) includes information about [subscriptions](https://www.gitlab.com/subscription/), [consultancy](https://www.gitlab.com/consultancy/), the [community](https://www.gitlab.com/community/) and the [hosted GitLab.com](https://www.gitlab.com/gitlab-com/).
33 35
34 -* [GitLab Enterprise Edition](https://www.gitlab.com/gitlab-ee/) offers additional features aimed at larger organizations. 36 +- [GitLab Enterprise Edition](https://www.gitlab.com/gitlab-ee/) offers additional features aimed at larger organizations.
35 37
36 -* [GitLab CI](https://www.gitlab.com/gitlab-ci/) is a continuous integration (CI) server that is easy to integrate with GitLab. 38 +- [GitLab CI](https://www.gitlab.com/gitlab-ci/) is a continuous integration (CI) server that is easy to integrate with GitLab.
37 39
38 -* Unofficial third-party [iPhone app](http://gitlabcontrol.com/), [Android app](https://play.google.com/store/apps/details?id=com.bd.gitlab&hl=en), [command line client](https://github.com/drewblessing/gitlab-cli), [Ruby API wrapper](https://github.com/NARKOZ/gitlab) and [Chrome app](https://chrome.google.com/webstore/detail/chrome-gitlab-notifier/eageapgbnjicdjjihgclpclilenjbobi) for GitLab. 40 +- Unofficial third-party [iPhone app](http://gitlabcontrol.com/), [Android app](https://play.google.com/store/apps/details?id=com.bd.gitlab&hl=en), [command line client](https://github.com/drewblessing/gitlab-cli), [Ruby API wrapper](https://github.com/NARKOZ/gitlab) and [Chrome app](https://chrome.google.com/webstore/detail/chrome-gitlab-notifier/eageapgbnjicdjjihgclpclilenjbobi) for GitLab.
39 41
40 -### Requirements 42 +## Requirements
41 43
42 -* Ubuntu/Debian/CentOS/RHEL**  
43 -* ruby 2.0+  
44 -* git 1.7.10+  
45 -* redis 2.0+  
46 -* MySQL or PostgreSQL 44 +- Ubuntu/Debian/CentOS/RHEL**
  45 +- ruby 2.0+
  46 +- git 1.7.10+
  47 +- redis 2.0+
  48 +- MySQL or PostgreSQL
47 49
48 -** More details are in the [requirements doc](doc/install/requirements.md) 50 +** More details are in the [requirements doc](doc/install/requirements.md).
49 51
50 -### Installation 52 +## Installation
51 53
52 Please see [the installation page on the GitLab website](https://www.gitlab.com/installation/). 54 Please see [the installation page on the GitLab website](https://www.gitlab.com/installation/).
53 55
@@ -59,22 +61,21 @@ Since 2011 a minor or major version of GitLab is released on the 22nd of every m @@ -59,22 +61,21 @@ Since 2011 a minor or major version of GitLab is released on the 22nd of every m
59 61
60 For updating the the Omnibus installation please see the [update documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md). For manual installations there is an [upgrader script](doc/update/upgrader.md) and there are [upgrade guides](doc/update). 62 For updating the the Omnibus installation please see the [update documentation](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/update.md). For manual installations there is an [upgrader script](doc/update/upgrader.md) and there are [upgrade guides](doc/update).
61 63
62 -### Run in production mode 64 +## Run in production mode
63 65
64 The Installation guide contains instructions on how to download an init script and run it automatically on boot. You can also start the init script manually: 66 The Installation guide contains instructions on how to download an init script and run it automatically on boot. You can also start the init script manually:
65 67
66 sudo service gitlab start 68 sudo service gitlab start
67 69
68 -or by directly calling the script 70 +or by directly calling the script:
69 71
70 sudo /etc/init.d/gitlab start 72 sudo /etc/init.d/gitlab start
71 73
72 -Please login with root / 5iveL!fe 74 +Please login with `root` / `5iveL!fe`.
73 75
74 ### Install a development environment 76 ### Install a development environment
75 77
76 -We recommend setting up your development environment with [the cookbook](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md#installation).  
77 -If you do not use the cookbook you might need to copy the example development unicorn configuration file 78 +We recommend setting up your development environment with [the cookbook](https://gitlab.com/gitlab-org/cookbook-gitlab/blob/master/README.md#installation). If you do not use the cookbook you might need to copy the example development unicorn configuration file
78 79
79 cp config/unicorn.rb.example.development config/unicorn.rb 80 cp config/unicorn.rb.example.development config/unicorn.rb
80 81
@@ -84,36 +85,35 @@ Start it with [Foreman](https://github.com/ddollar/foreman) @@ -84,36 +85,35 @@ Start it with [Foreman](https://github.com/ddollar/foreman)
84 85
85 bundle exec foreman start -p 3000 86 bundle exec foreman start -p 3000
86 87
87 -or start each component separately 88 +or start each component separately:
88 89
89 bundle exec rails s 90 bundle exec rails s
90 bin/background_jobs start 91 bin/background_jobs start
91 92
92 -And surf to [localhost:3000](http://localhost:3000/) and login with root / 5iveL!fe 93 +And surf to [localhost:3000](http://localhost:3000/) and login with `root` / `5iveL!fe`.
93 94
94 -### Run the tests 95 +## Run the tests
95 96
96 -* Run all tests 97 +- Run all tests:
97 98
98 bundle exec rake test 99 bundle exec rake test
99 100
100 -* [RSpec](http://rspec.info/) unit and functional tests  
101 -  
102 - All RSpec tests: bundle exec rake spec 101 +- [RSpec](http://rspec.info/) unit and functional tests.
103 102
104 - Single RSpec file: bundle exec rspec spec/controllers/commit_controller_spec.rb 103 + All RSpec tests: `bundle exec rake spec`
105 104
106 -* [Spinach](https://github.com/codegram/spinach) integration tests 105 + Single RSpec file: `bundle exec rspec spec/controllers/commit_controller_spec.rb`
107 106
108 - All Spinach tests: bundle exec rake spinach 107 +- [Spinach](https://github.com/codegram/spinach) integration tests.
109 108
110 - Single Spinach test: bundle exec spinach features/project/issues/milestones.feature 109 + All Spinach tests: `bundle exec rake spinach`
111 110
  111 + Single Spinach test: `bundle exec spinach features/project/issues/milestones.feature`
112 112
113 -### Documentation 113 +## Documentation
114 114
115 All documentation can be found on [doc.gitlab.com/ce/](http://doc.gitlab.com/ce/). 115 All documentation can be found on [doc.gitlab.com/ce/](http://doc.gitlab.com/ce/).
116 116
117 -### Getting help 117 +## Getting help
118 118
119 Please see [Getting help for GitLab](https://www.gitlab.com/getting-help/) on our website for the many options to get help. 119 Please see [Getting help for GitLab](https://www.gitlab.com/getting-help/) on our website for the many options to get help.
1 -**User documentation** 1 +# Documentation
2 2
3 -+ [API](api/README.md) Explore how you can access GitLab via a simple and powerful API.  
4 -+ [Markdown](markdown/markdown.md) Learn what you can do with GitLab's advanced formatting system.  
5 -+ [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do.  
6 -+ [Public access](public_access/public_access.md) Learn how you can allow public and internal access to a project.  
7 -+ [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.  
8 -+ [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.  
9 -+ [Workflow](workflow/README.md) Learn how to use Git and GitLab together. 3 +## User documentation
10 4
11 -**Administrator documentation** 5 +- [API](api/README.md) Explore how you can access GitLab via a simple and powerful API.
  6 +- [Markdown](markdown/markdown.md) Learn what you can do with GitLab's advanced formatting system.
  7 +- [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do.
  8 +- [Public access](public_access/public_access.md) Learn how you can allow public and internal access to a project.
  9 +- [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
  10 +- [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
  11 +- [Workflow](workflow/README.md) Learn how to use Git and GitLab together.
12 12
13 -+ [Install](install/README.md) Requirements, directory structures and manual installation.  
14 -+ [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.  
15 -+ [Raketasks](raketasks/README.md) Explore what GitLab has in store for you to make administration easier.  
16 -+ [System hooks](system_hooks/system_hooks.md) Let GitLab notify you when certain management tasks need to be carried out.  
17 -+ [Security](security/README.md) Learn what you can do to further secure your GitLab instance.  
18 -+ [Update](update/README.md) Update guides to upgrade your installation. 13 +## Administrator documentation
19 14
20 -**Contributor documentation** 15 +- [Install](install/README.md) Requirements, directory structures and manual installation.
  16 +- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
  17 +- [Raketasks](raketasks/README.md) Explore what GitLab has in store for you to make administration easier.
  18 +- [System hooks](system_hooks/system_hooks.md) Let GitLab notify you when certain management tasks need to be carried out.
  19 +- [Security](security/README.md) Learn what you can do to further secure your GitLab instance.
  20 +- [Update](update/README.md) Update guides to upgrade your installation.
21 21
22 -+ [Development](development/README.md) Explains the architecture and the guidelines for shell commands.  
23 -+ [Legal](legal/README.md) Contributor license agreements.  
24 -+ [Release](release/README.md) How to make the monthly and security releases. 22 +## Contributor documentation
  23 +
  24 +- [Development](development/README.md) Explains the architecture and the guidelines for shell commands.
  25 +- [Legal](legal/README.md) Contributor license agreements.
  26 +- [Release](release/README.md) How to make the monthly and security releases.
doc/api/README.md
@@ -2,31 +2,31 @@ @@ -2,31 +2,31 @@
2 2
3 ## Resources 3 ## Resources
4 4
5 -+ [Users](users.md)  
6 -+ [Session](session.md)  
7 -+ [Projects](projects.md)  
8 -+ [Project Snippets](project_snippets.md)  
9 -+ [Repositories](repositories.md)  
10 -+ [Repository Files](repository_files.md)  
11 -+ [Commits](commits.md)  
12 -+ [Branches](branches.md)  
13 -+ [Merge Requests](merge_requests.md)  
14 -+ [Issues](issues.md)  
15 -+ [Milestones](milestones.md)  
16 -+ [Notes](notes.md) (comments)  
17 -+ [Deploy Keys](deploy_keys.md)  
18 -+ [System Hooks](system_hooks.md)  
19 -+ [Groups](groups.md) 5 +- [Users](users.md)
  6 +- [Session](session.md)
  7 +- [Projects](projects.md)
  8 +- [Project Snippets](project_snippets.md)
  9 +- [Repositories](repositories.md)
  10 +- [Repository Files](repository_files.md)
  11 +- [Commits](commits.md)
  12 +- [Branches](branches.md)
  13 +- [Merge Requests](merge_requests.md)
  14 +- [Issues](issues.md)
  15 +- [Milestones](milestones.md)
  16 +- [Notes](notes.md) (comments)
  17 +- [Deploy Keys](deploy_keys.md)
  18 +- [System Hooks](system_hooks.md)
  19 +- [Groups](groups.md)
20 20
21 ## Clients 21 ## Clients
22 22
23 -+ [php-gitlab-api](https://github.com/m4tthumphrey/php-gitlab-api) - PHP  
24 -+ [Laravel API Wrapper for GitLab CE](https://github.com/adamgoose/gitlab) - PHP / [Laravel](http://laravel.com)  
25 -+ [Ruby Wrapper](https://github.com/NARKOZ/gitlab) - Ruby  
26 -+ [python-gitlab](https://github.com/Itxaka/python-gitlab) - Python  
27 -+ [java-gitlab-api](https://github.com/timols/java-gitlab-api) - Java  
28 -+ [node-gitlab](https://github.com/moul/node-gitlab) - Node.js  
29 -+ [NGitLab](https://github.com/Scooletz/NGitLab) - .NET 23 +- [php-gitlab-api](https://github.com/m4tthumphrey/php-gitlab-api) - PHP
  24 +- [Laravel API Wrapper for GitLab CE](https://github.com/adamgoose/gitlab) - PHP / [Laravel](http://laravel.com)
  25 +- [Ruby Wrapper](https://github.com/NARKOZ/gitlab) - Ruby
  26 +- [python-gitlab](https://github.com/Itxaka/python-gitlab) - Python
  27 +- [java-gitlab-api](https://github.com/timols/java-gitlab-api) - Java
  28 +- [node-gitlab](https://github.com/moul/node-gitlab) - Node.js
  29 +- [NGitLab](https://github.com/Scooletz/NGitLab) - .NET
30 30
31 ## Introduction 31 ## Introduction
32 32
@@ -54,41 +54,35 @@ Example for a valid API request using curl and authentication via header: @@ -54,41 +54,35 @@ Example for a valid API request using curl and authentication via header:
54 curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" "http://example.com/api/v3/projects" 54 curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" "http://example.com/api/v3/projects"
55 ``` 55 ```
56 56
57 -  
58 The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL. 57 The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL.
59 58
60 -  
61 -  
62 ## Status codes 59 ## Status codes
63 60
64 -The API is designed to return different status codes according to context and action. In this way  
65 -if a request results in an error the caller is able to get insight into what went wrong, e.g.  
66 -status code `400 Bad Request` is returned if a required attribute is missing from the request.  
67 -The following list gives an overview of how the API functions generally behave. 61 +The API is designed to return different status codes according to context and action. In this way if a request results in an error the caller is able to get insight into what went wrong, e.g. status code `400 Bad Request` is returned if a required attribute is missing from the request. The following list gives an overview of how the API functions generally behave.
68 62
69 API request types: 63 API request types:
70 64
71 -* `GET` requests access one or more resources and return the result as JSON  
72 -* `POST` requests return `201 Created` if the resource is successfully created and return the newly created resource as JSON  
73 -* `GET`, `PUT` and `DELETE` return `200 Ok` if the resource is accessed, modified or deleted successfully, the (modified) result is returned as JSON  
74 -* `DELETE` requests are designed to be idempotent, meaning a request a resource still returns `200 Ok` even it was deleted before or is not available. The reasoning behind it is the user is not really interested if the resource existed before or not.  
75 - 65 +- `GET` requests access one or more resources and return the result as JSON
  66 +- `POST` requests return `201 Created` if the resource is successfully created and return the newly created resource as JSON
  67 +- `GET`, `PUT` and `DELETE` return `200 Ok` if the resource is accessed, modified or deleted successfully, the (modified) result is returned as JSON
  68 +- `DELETE` requests are designed to be idempotent, meaning a request a resource still returns `200 Ok` even it was deleted before or is not available. The reasoning behind it is the user is not really interested if the resource existed before or not.
76 69
77 The following list shows the possible return codes for API requests. 70 The following list shows the possible return codes for API requests.
78 71
79 Return values: 72 Return values:
80 73
81 -* `200 Ok` - The `GET`, `PUT` or `DELETE` request was successful, the resource(s) itself is returned as JSON  
82 -* `201 Created` - The `POST` request was successful and the resource is returned as JSON  
83 -* `400 Bad Request` - A required attribute of the API request is missing, e.g. the title of an issue is not given  
84 -* `401 Unauthorized` - The user is not authenticated, a valid user token is necessary, see above  
85 -* `403 Forbidden` - The request is not allowed, e.g. the user is not allowed to delete a project  
86 -* `404 Not Found` - A resource could not be accessed, e.g. an ID for a resource could not be found  
87 -* `405 Method Not Allowed` - The request is not supported  
88 -* `409 Conflict` - A conflicting resource already exists, e.g. creating a project with a name that already exists  
89 -* `500 Server Error` - While handling the request something went wrong on the server side 74 +- `200 Ok` - The `GET`, `PUT` or `DELETE` request was successful, the resource(s) itself is returned as JSON
  75 +- `201 Created` - The `POST` request was successful and the resource is returned as JSON
  76 +- `400 Bad Request` - A required attribute of the API request is missing, e.g. the title of an issue is not given
  77 +- `401 Unauthorized` - The user is not authenticated, a valid user token is necessary, see above
  78 +- `403 Forbidden` - The request is not allowed, e.g. the user is not allowed to delete a project
  79 +- `404 Not Found` - A resource could not be accessed, e.g. an ID for a resource could not be found
  80 +- `405 Method Not Allowed` - The request is not supported
  81 +- `409 Conflict` - A conflicting resource already exists, e.g. creating a project with a name that already exists
  82 +- `500 Server Error` - While handling the request something went wrong on the server side
90 83
91 ## Sudo 84 ## Sudo
  85 +
92 All API requests support performing an api call as if you were another user, if your private token is for an administration account. You need to pass `sudo` parameter by url or header with an id or username of the user you want to perform the operation as. If passed as header, the header name must be "SUDO" (capitals). 86 All API requests support performing an api call as if you were another user, if your private token is for an administration account. You need to pass `sudo` parameter by url or header with an id or username of the user you want to perform the operation as. If passed as header, the header name must be "SUDO" (capitals).
93 87
94 If a non administrative `private_token` is provided then an error message will be returned with status code 403: 88 If a non administrative `private_token` is provided then an error message will be returned with status code 403:
@@ -112,16 +106,17 @@ Example of a valid API with sudo request: @@ -112,16 +106,17 @@ Example of a valid API with sudo request:
112 ``` 106 ```
113 GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U&sudo=username 107 GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U&sudo=username
114 ``` 108 ```
  109 +
115 ``` 110 ```
116 GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U&sudo=23 111 GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U&sudo=23
117 ``` 112 ```
118 113
119 -  
120 Example for a valid API request with sudo using curl and authentication via header: 114 Example for a valid API request with sudo using curl and authentication via header:
121 115
122 ``` 116 ```
123 curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: username" "http://example.com/api/v3/projects" 117 curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: username" "http://example.com/api/v3/projects"
124 ``` 118 ```
  119 +
125 ``` 120 ```
126 curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http://example.com/api/v3/projects" 121 curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http://example.com/api/v3/projects"
127 ``` 122 ```
@@ -130,24 +125,21 @@ curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http:// @@ -130,24 +125,21 @@ curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http://
130 125
131 When listing resources you can pass the following parameters: 126 When listing resources you can pass the following parameters:
132 127
133 -+ `page` (default: `1`) - page number  
134 -+ `per_page` (default: `20`, max: `100`) - number of items to list per page 128 +- `page` (default: `1`) - page number
  129 +- `per_page` (default: `20`, max: `100`) - number of items to list per page
135 130
136 -[Link headers](http://www.w3.org/wiki/LinkHeader) are send back with each response.  
137 -These have `rel` prev/next/first/last and contain the relevant url.  
138 -Please use these instead of generating your own urls. 131 +[Link headers](http://www.w3.org/wiki/LinkHeader) are send back with each response. These have `rel` prev/next/first/last and contain the relevant URL. Please use these instead of generating your own urls.
139 132
140 ## id vs iid 133 ## id vs iid
141 134
142 -When you work with API you may notice two similar fields in api entites: id and iid.  
143 -The main difference between them is scope. Example: 135 +When you work with API you may notice two similar fields in api entites: id and iid. The main difference between them is scope. Example:
  136 +
  137 +Issue:
144 138
145 -Issue  
146 - id: 46  
147 - iid: 5 139 + id: 46
  140 + iid: 5
148 141
149 -* id - is uniq across all Issues table. It used for any api calls.  
150 -* iid - is uniq only in scope of single project. When you browse issues or merge requests with Web UI - you see iid. 142 +- id - is uniq across all Issues table. It used for any api calls.
  143 +- iid - is uniq only in scope of single project. When you browse issues or merge requests with Web UI - you see iid.
151 144
152 -So if you want to get issue with api you use `http://host/api/v3/.../issues/:id.json`  
153 -But when you want to create a link to web page - use `http:://host/project/issues/:iid.json` 145 +So if you want to get issue with api you use `http://host/api/v3/.../issues/:id.json`. But when you want to create a link to web page - use `http:://host/project/issues/:iid.json`
doc/api/branches.md
@@ -10,7 +10,7 @@ GET /projects/:id/repository/branches @@ -10,7 +10,7 @@ GET /projects/:id/repository/branches
10 10
11 Parameters: 11 Parameters:
12 12
13 -+ `id` (required) - The ID of a project 13 +- `id` (required) - The ID of a project
14 14
15 ```json 15 ```json
16 [ 16 [
@@ -52,8 +52,8 @@ GET /projects/:id/repository/branches/:branch @@ -52,8 +52,8 @@ GET /projects/:id/repository/branches/:branch
52 52
53 Parameters: 53 Parameters:
54 54
55 -+ `id` (required) - The ID of a project  
56 -+ `branch` (required) - The name of the branch 55 +- `id` (required) - The ID of a project
  56 +- `branch` (required) - The name of the branch
57 57
58 ```json 58 ```json
59 { 59 {
@@ -82,7 +82,6 @@ Parameters: @@ -82,7 +82,6 @@ Parameters:
82 } 82 }
83 ``` 83 ```
84 84
85 -  
86 ## Protect repository branch 85 ## Protect repository branch
87 86
88 Protects a single project repository branch. This is an idempotent function, protecting an already 87 Protects a single project repository branch. This is an idempotent function, protecting an already
@@ -94,8 +93,8 @@ PUT /projects/:id/repository/branches/:branch/protect @@ -94,8 +93,8 @@ PUT /projects/:id/repository/branches/:branch/protect
94 93
95 Parameters: 94 Parameters:
96 95
97 -+ `id` (required) - The ID of a project  
98 -+ `branch` (required) - The name of the branch 96 +- `id` (required) - The ID of a project
  97 +- `branch` (required) - The name of the branch
99 98
100 ```json 99 ```json
101 { 100 {
@@ -124,7 +123,6 @@ Parameters: @@ -124,7 +123,6 @@ Parameters:
124 } 123 }
125 ``` 124 ```
126 125
127 -  
128 ## Unprotect repository branch 126 ## Unprotect repository branch
129 127
130 Unprotects a single project repository branch. This is an idempotent function, unprotecting an already 128 Unprotects a single project repository branch. This is an idempotent function, unprotecting an already
@@ -136,8 +134,8 @@ PUT /projects/:id/repository/branches/:branch/unprotect @@ -136,8 +134,8 @@ PUT /projects/:id/repository/branches/:branch/unprotect
136 134
137 Parameters: 135 Parameters:
138 136
139 -+ `id` (required) - The ID of a project  
140 -+ `branch` (required) - The name of the branch 137 +- `id` (required) - The ID of a project
  138 +- `branch` (required) - The name of the branch
141 139
142 ```json 140 ```json
143 { 141 {
@@ -168,16 +166,15 @@ Parameters: @@ -168,16 +166,15 @@ Parameters:
168 166
169 ## Create repository branch 167 ## Create repository branch
170 168
171 -  
172 ``` 169 ```
173 POST /projects/:id/repository/branches 170 POST /projects/:id/repository/branches
174 ``` 171 ```
175 172
176 Parameters: 173 Parameters:
177 174
178 -+ `id` (required) - The ID of a project  
179 -+ `branch_name` (required) - The name of the branch  
180 -+ `ref` (required) - Create branch from commit sha or existing branch 175 +- `id` (required) - The ID of a project
  176 +- `branch_name` (required) - The name of the branch
  177 +- `ref` (required) - Create branch from commit sha or existing branch
181 178
182 ```json 179 ```json
183 { 180 {
doc/api/commits.md
@@ -10,8 +10,8 @@ GET /projects/:id/repository/commits @@ -10,8 +10,8 @@ GET /projects/:id/repository/commits
10 10
11 Parameters: 11 Parameters:
12 12
13 -+ `id` (required) - The ID of a project  
14 -+ `ref_name` (optional) - The name of a repository branch or tag or if not given the default branch 13 +- `id` (required) - The ID of a project
  14 +- `ref_name` (optional) - The name of a repository branch or tag or if not given the default branch
15 15
16 ```json 16 ```json
17 [ 17 [
@@ -44,8 +44,8 @@ GET /projects/:id/repository/commits/:sha @@ -44,8 +44,8 @@ GET /projects/:id/repository/commits/:sha
44 44
45 Parameters: 45 Parameters:
46 46
47 -+ `id` (required) - The ID of a project  
48 -+ `sha` (required) - The commit hash or name of a repository branch or tag 47 +- `id` (required) - The ID of a project
  48 +- `sha` (required) - The commit hash or name of a repository branch or tag
49 49
50 ```json 50 ```json
51 { 51 {
@@ -63,7 +63,6 @@ Parameters: @@ -63,7 +63,6 @@ Parameters:
63 } 63 }
64 ``` 64 ```
65 65
66 -  
67 ## Get the diff of a commit 66 ## Get the diff of a commit
68 67
69 Get the diff of a commit in a project. 68 Get the diff of a commit in a project.
@@ -74,8 +73,8 @@ GET /projects/:id/repository/commits/:sha/diff @@ -74,8 +73,8 @@ GET /projects/:id/repository/commits/:sha/diff
74 73
75 Parameters: 74 Parameters:
76 75
77 -+ `id` (required) - The ID of a project  
78 -+ `sha` (required) - The name of a repository branch or tag or if not given the default branch 76 +- `id` (required) - The ID of a project
  77 +- `sha` (required) - The name of a repository branch or tag or if not given the default branch
79 78
80 ```json 79 ```json
81 [ 80 [
@@ -91,5 +90,3 @@ Parameters: @@ -91,5 +90,3 @@ Parameters:
91 } 90 }
92 ] 91 ]
93 ``` 92 ```
94 -  
95 -  
doc/api/deploy_keys.md
1 # Deploy Keys 1 # Deploy Keys
2 2
3 -### List deploy keys 3 +## List deploy keys
4 4
5 Get a list of a project's deploy keys. 5 Get a list of a project's deploy keys.
6 6
@@ -10,7 +10,7 @@ GET /projects/:id/keys @@ -10,7 +10,7 @@ GET /projects/:id/keys
10 10
11 Parameters: 11 Parameters:
12 12
13 -+ `id` (required) - The ID of the project 13 +- `id` (required) - The ID of the project
14 14
15 ```json 15 ```json
16 [ 16 [
@@ -29,8 +29,7 @@ Parameters: @@ -29,8 +29,7 @@ Parameters:
29 ] 29 ]
30 ``` 30 ```
31 31
32 -  
33 -### Single deploy key 32 +## Single deploy key
34 33
35 Get a single key. 34 Get a single key.
36 35
@@ -40,8 +39,8 @@ GET /projects/:id/keys/:key_id @@ -40,8 +39,8 @@ GET /projects/:id/keys/:key_id
40 39
41 Parameters: 40 Parameters:
42 41
43 -+ `id` (required) - The ID of the project  
44 -+ `key_id` (required) - The ID of the deploy key 42 +- `id` (required) - The ID of the project
  43 +- `key_id` (required) - The ID of the deploy key
45 44
46 ```json 45 ```json
47 { 46 {
@@ -52,8 +51,7 @@ Parameters: @@ -52,8 +51,7 @@ Parameters:
52 } 51 }
53 ``` 52 ```
54 53
55 -  
56 -### Add deploy key 54 +## Add deploy key
57 55
58 Creates a new deploy key for a project. 56 Creates a new deploy key for a project.
59 If deploy key already exists in another project - it will be joined to project but only if original one was is accessible by same user 57 If deploy key already exists in another project - it will be joined to project but only if original one was is accessible by same user
@@ -64,12 +62,11 @@ POST /projects/:id/keys @@ -64,12 +62,11 @@ POST /projects/:id/keys
64 62
65 Parameters: 63 Parameters:
66 64
67 -+ `id` (required) - The ID of the project  
68 -+ `title` (required) - New deploy key's title  
69 -+ `key` (required) - New deploy key 65 +- `id` (required) - The ID of the project
  66 +- `title` (required) - New deploy key's title
  67 +- `key` (required) - New deploy key
70 68
71 -  
72 -### Delete deploy key 69 +## Delete deploy key
73 70
74 Delete a deploy key from a project 71 Delete a deploy key from a project
75 72
@@ -79,6 +76,5 @@ DELETE /projects/:id/keys/:key_id @@ -79,6 +76,5 @@ DELETE /projects/:id/keys/:key_id
79 76
80 Parameters: 77 Parameters:
81 78
82 -+ `id` (required) - The ID of the project  
83 -+ `key_id` (required) - The ID of the deploy key  
84 - 79 +- `id` (required) - The ID of the project
  80 +- `key_id` (required) - The ID of the deploy key
doc/api/issues.md
@@ -73,7 +73,6 @@ GET /issues @@ -73,7 +73,6 @@ GET /issues
73 ] 73 ]
74 ``` 74 ```
75 75
76 -  
77 ## List project issues 76 ## List project issues
78 77
79 Get a list of project issues. This function accepts pagination parameters `page` and `per_page` 78 Get a list of project issues. This function accepts pagination parameters `page` and `per_page`
@@ -85,8 +84,7 @@ GET /projects/:id/issues @@ -85,8 +84,7 @@ GET /projects/:id/issues
85 84
86 Parameters: 85 Parameters:
87 86
88 -+ `id` (required) - The ID of a project  
89 - 87 +- `id` (required) - The ID of a project
90 88
91 ## Single issue 89 ## Single issue
92 90
@@ -98,8 +96,8 @@ GET /projects/:id/issues/:issue_id @@ -98,8 +96,8 @@ GET /projects/:id/issues/:issue_id
98 96
99 Parameters: 97 Parameters:
100 98
101 -+ `id` (required) - The ID of a project  
102 -+ `issue_id` (required) - The ID of a project issue 99 +- `id` (required) - The ID of a project
  100 +- `issue_id` (required) - The ID of a project issue
103 101
104 ```json 102 ```json
105 { 103 {
@@ -142,7 +140,6 @@ Parameters: @@ -142,7 +140,6 @@ Parameters:
142 } 140 }
143 ``` 141 ```
144 142
145 -  
146 ## New issue 143 ## New issue
147 144
148 Creates a new project issue. 145 Creates a new project issue.
@@ -153,13 +150,12 @@ POST /projects/:id/issues @@ -153,13 +150,12 @@ POST /projects/:id/issues
153 150
154 Parameters: 151 Parameters:
155 152
156 -+ `id` (required) - The ID of a project  
157 -+ `title` (required) - The title of an issue  
158 -+ `description` (optional) - The description of an issue  
159 -+ `assignee_id` (optional) - The ID of a user to assign issue  
160 -+ `milestone_id` (optional) - The ID of a milestone to assign issue  
161 -+ `labels` (optional) - Comma-separated label names for an issue  
162 - 153 +- `id` (required) - The ID of a project
  154 +- `title` (required) - The title of an issue
  155 +- `description` (optional) - The description of an issue
  156 +- `assignee_id` (optional) - The ID of a user to assign issue
  157 +- `milestone_id` (optional) - The ID of a milestone to assign issue
  158 +- `labels` (optional) - Comma-separated label names for an issue
163 159
164 ## Edit issue 160 ## Edit issue
165 161
@@ -171,21 +167,18 @@ PUT /projects/:id/issues/:issue_id @@ -171,21 +167,18 @@ PUT /projects/:id/issues/:issue_id
171 167
172 Parameters: 168 Parameters:
173 169
174 -+ `id` (required) - The ID of a project  
175 -+ `issue_id` (required) - The ID of a project's issue  
176 -+ `title` (optional) - The title of an issue  
177 -+ `description` (optional) - The description of an issue  
178 -+ `assignee_id` (optional) - The ID of a user to assign issue  
179 -+ `milestone_id` (optional) - The ID of a milestone to assign issue  
180 -+ `labels` (optional) - Comma-separated label names for an issue  
181 -+ `state_event` (optional) - The state event of an issue ('close' to close issue and 'reopen' to reopen it)  
182 - 170 +- `id` (required) - The ID of a project
  171 +- `issue_id` (required) - The ID of a project's issue
  172 +- `title` (optional) - The title of an issue
  173 +- `description` (optional) - The description of an issue
  174 +- `assignee_id` (optional) - The ID of a user to assign issue
  175 +- `milestone_id` (optional) - The ID of a milestone to assign issue
  176 +- `labels` (optional) - Comma-separated label names for an issue
  177 +- `state_event` (optional) - The state event of an issue ('close' to close issue and 'reopen' to reopen it)
183 178
184 ## Delete existing issue (**Deprecated**) 179 ## Delete existing issue (**Deprecated**)
185 180
186 -The function is deprecated and returns a `405 Method Not Allowed`  
187 -error if called. An issue gets now closed and is done by calling `PUT /projects/:id/issues/:issue_id` with  
188 -parameter `closed` set to 1. 181 +The function is deprecated and returns a `405 Method Not Allowed` error if called. An issue gets now closed and is done by calling `PUT /projects/:id/issues/:issue_id` with parameter `closed` set to 1.
189 182
190 ``` 183 ```
191 DELETE /projects/:id/issues/:issue_id 184 DELETE /projects/:id/issues/:issue_id
@@ -193,8 +186,8 @@ DELETE /projects/:id/issues/:issue_id @@ -193,8 +186,8 @@ DELETE /projects/:id/issues/:issue_id
193 186
194 Parameters: 187 Parameters:
195 188
196 -+ `id` (required) - The project ID  
197 -+ `issue_id` (required) - The ID of the issue 189 +- `id` (required) - The project ID
  190 +- `issue_id` (required) - The ID of the issue
198 191
199 ## Comments on issues 192 ## Comments on issues
200 193
doc/api/merge_requests.md
@@ -2,11 +2,7 @@ @@ -2,11 +2,7 @@
2 2
3 ## List merge requests 3 ## List merge requests
4 4
5 -Get all merge requests for this project.  
6 -The `state` parameter can be used to get only merge requests with a  
7 -given state (`opened`, `closed`, or `merged`) or all of them (`all`).  
8 -The pagination parameters `page` and `per_page` can be used to restrict the  
9 -list of merge requests. 5 +Get all merge requests for this project. The `state` parameter can be used to get only merge requests with a given state (`opened`, `closed`, or `merged`) or all of them (`all`). The pagination parameters `page` and `per_page` can be used to restrict the list of merge requests.
10 6
11 ``` 7 ```
12 GET /projects/:id/merge_requests 8 GET /projects/:id/merge_requests
@@ -16,8 +12,8 @@ GET /projects/:id/merge_requests?state=all @@ -16,8 +12,8 @@ GET /projects/:id/merge_requests?state=all
16 12
17 Parameters: 13 Parameters:
18 14
19 -+ `id` (required) - The ID of a project  
20 -+ `state` (optional) - Return `all` requests or just those that are `merged`, `opened` or `closed` 15 +- `id` (required) - The ID of a project
  16 +- `state` (optional) - Return `all` requests or just those that are `merged`, `opened` or `closed`
21 17
22 ```json 18 ```json
23 [ 19 [
@@ -51,7 +47,6 @@ Parameters: @@ -51,7 +47,6 @@ Parameters:
51 ] 47 ]
52 ``` 48 ```
53 49
54 -  
55 ## Get single MR 50 ## Get single MR
56 51
57 Shows information about a single merge request. 52 Shows information about a single merge request.
@@ -62,8 +57,8 @@ GET /projects/:id/merge_request/:merge_request_id @@ -62,8 +57,8 @@ GET /projects/:id/merge_request/:merge_request_id
62 57
63 Parameters: 58 Parameters:
64 59
65 -+ `id` (required) - The ID of a project  
66 -+ `merge_request_id` (required) - The ID of MR 60 +- `id` (required) - The ID of a project
  61 +- `merge_request_id` (required) - The ID of MR
67 62
68 ```json 63 ```json
69 { 64 {
@@ -95,7 +90,6 @@ Parameters: @@ -95,7 +90,6 @@ Parameters:
95 } 90 }
96 ``` 91 ```
97 92
98 -  
99 ## Create MR 93 ## Create MR
100 94
101 Creates a new merge request. 95 Creates a new merge request.
@@ -106,12 +100,12 @@ POST /projects/:id/merge_requests @@ -106,12 +100,12 @@ POST /projects/:id/merge_requests
106 100
107 Parameters: 101 Parameters:
108 102
109 -+ `id` (required) - The ID of a project  
110 -+ `source_branch` (required) - The source branch  
111 -+ `target_branch` (required) - The target branch  
112 -+ `assignee_id` (optional) - Assignee user ID  
113 -+ `title` (required) - Title of MR  
114 -+ `target_project_id` (optional) - The target project (numeric id) 103 +- `id` (required) - The ID of a project
  104 +- `source_branch` (required) - The source branch
  105 +- `target_branch` (required) - The target branch
  106 +- `assignee_id` (optional) - Assignee user ID
  107 +- `title` (required) - Title of MR
  108 +- `target_project_id` (optional) - The target project (numeric id)
115 109
116 ```json 110 ```json
117 { 111 {
@@ -142,7 +136,6 @@ Parameters: @@ -142,7 +136,6 @@ Parameters:
142 } 136 }
143 ``` 137 ```
144 138
145 -  
146 ## Update MR 139 ## Update MR
147 140
148 Updates an existing merge request. You can change branches, title, or even close the MR. 141 Updates an existing merge request. You can change branches, title, or even close the MR.
@@ -153,13 +146,13 @@ PUT /projects/:id/merge_request/:merge_request_id @@ -153,13 +146,13 @@ PUT /projects/:id/merge_request/:merge_request_id
153 146
154 Parameters: 147 Parameters:
155 148
156 -+ `id` (required) - The ID of a project  
157 -+ `merge_request_id` (required) - ID of MR  
158 -+ `source_branch` - The source branch  
159 -+ `target_branch` - The target branch  
160 -+ `assignee_id` - Assignee user ID  
161 -+ `title` - Title of MR  
162 -+ `state_event` - New state (close|reopen|merge) 149 +- `id` (required) - The ID of a project
  150 +- `merge_request_id` (required) - ID of MR
  151 +- `source_branch` - The source branch
  152 +- `target_branch` - The target branch
  153 +- `assignee_id` - Assignee user ID
  154 +- `title` - Title of MR
  155 +- `state_event` - New state (close|reopen|merge)
163 156
164 ```json 157 ```json
165 { 158 {
@@ -190,13 +183,16 @@ Parameters: @@ -190,13 +183,16 @@ Parameters:
190 } 183 }
191 ``` 184 ```
192 185
193 -  
194 ## Accept MR 186 ## Accept MR
195 187
196 Merge changes submitted with MR usign this API. 188 Merge changes submitted with MR usign this API.
  189 +
197 If merge success you get 200 OK. 190 If merge success you get 200 OK.
  191 +
198 If it has some conflicts and can not be merged - you get 405 and error message 'Branch cannot be merged' 192 If it has some conflicts and can not be merged - you get 405 and error message 'Branch cannot be merged'
  193 +
199 If merge request is already merged or closed - you get 405 and error message 'Method Not Allowed' 194 If merge request is already merged or closed - you get 405 and error message 'Method Not Allowed'
  195 +
200 If you dont have permissions to accept this merge request - you get 401 196 If you dont have permissions to accept this merge request - you get 401
201 197
202 ``` 198 ```
@@ -205,9 +201,9 @@ PUT /projects/:id/merge_request/:merge_request_id/merge @@ -205,9 +201,9 @@ PUT /projects/:id/merge_request/:merge_request_id/merge
205 201
206 Parameters: 202 Parameters:
207 203
208 -+ `id` (required) - The ID of a project  
209 -+ `merge_request_id` (required) - ID of MR  
210 -+ `merge_commit_message` (optional) - Custom merge commit message 204 +- `id` (required) - The ID of a project
  205 +- `merge_request_id` (required) - ID of MR
  206 +- `merge_commit_message` (optional) - Custom merge commit message
211 207
212 ```json 208 ```json
213 { 209 {
@@ -238,7 +234,6 @@ Parameters: @@ -238,7 +234,6 @@ Parameters:
238 } 234 }
239 ``` 235 ```
240 236
241 -  
242 ## Post comment to MR 237 ## Post comment to MR
243 238
244 Adds a comment to a merge request. 239 Adds a comment to a merge request.
@@ -249,10 +244,9 @@ POST /projects/:id/merge_request/:merge_request_id/comments @@ -249,10 +244,9 @@ POST /projects/:id/merge_request/:merge_request_id/comments
249 244
250 Parameters: 245 Parameters:
251 246
252 -+ `id` (required) - The ID of a project  
253 -+ `merge_request_id` (required) - ID of merge request  
254 -+ `note` (required) - Text of comment  
255 - 247 +- `id` (required) - The ID of a project
  248 +- `merge_request_id` (required) - ID of merge request
  249 +- `note` (required) - Text of comment
256 250
257 ```json 251 ```json
258 { 252 {
@@ -268,7 +262,6 @@ Parameters: @@ -268,7 +262,6 @@ Parameters:
268 } 262 }
269 ``` 263 ```
270 264
271 -  
272 ## Get the comments on a MR 265 ## Get the comments on a MR
273 266
274 Gets all the comments associated with a merge request. 267 Gets all the comments associated with a merge request.
@@ -279,8 +272,8 @@ GET /projects/:id/merge_request/:merge_request_id/comments @@ -279,8 +272,8 @@ GET /projects/:id/merge_request/:merge_request_id/comments
279 272
280 Parameters: 273 Parameters:
281 274
282 -+ `id` (required) - The ID of a project  
283 -+ `merge_request_id` (required) - ID of merge request 275 +- `id` (required) - The ID of a project
  276 +- `merge_request_id` (required) - ID of merge request
284 277
285 ```json 278 ```json
286 [ 279 [
doc/api/milestones.md
@@ -26,8 +26,7 @@ GET /projects/:id/milestones @@ -26,8 +26,7 @@ GET /projects/:id/milestones
26 26
27 Parameters: 27 Parameters:
28 28
29 -+ `id` (required) - The ID of a project  
30 - 29 +- `id` (required) - The ID of a project
31 30
32 ## Get single milestone 31 ## Get single milestone
33 32
@@ -39,9 +38,8 @@ GET /projects/:id/milestones/:milestone_id @@ -39,9 +38,8 @@ GET /projects/:id/milestones/:milestone_id
39 38
40 Parameters: 39 Parameters:
41 40
42 -+ `id` (required) - The ID of a project  
43 -+ `milestone_id` (required) - The ID of a project milestone  
44 - 41 +- `id` (required) - The ID of a project
  42 +- `milestone_id` (required) - The ID of a project milestone
45 43
46 ## Create new milestone 44 ## Create new milestone
47 45
@@ -53,11 +51,10 @@ POST /projects/:id/milestones @@ -53,11 +51,10 @@ POST /projects/:id/milestones
53 51
54 Parameters: 52 Parameters:
55 53
56 -+ `id` (required) - The ID of a project  
57 -+ `title` (required) - The title of an milestone  
58 -+ `description` (optional) - The description of the milestone  
59 -+ `due_date` (optional) - The due date of the milestone  
60 - 54 +- `id` (required) - The ID of a project
  55 +- `title` (required) - The title of an milestone
  56 +- `description` (optional) - The description of the milestone
  57 +- `due_date` (optional) - The due date of the milestone
61 58
62 ## Edit milestone 59 ## Edit milestone
63 60
@@ -69,10 +66,9 @@ PUT /projects/:id/milestones/:milestone_id @@ -69,10 +66,9 @@ PUT /projects/:id/milestones/:milestone_id
69 66
70 Parameters: 67 Parameters:
71 68
72 -+ `id` (required) - The ID of a project  
73 -+ `milestone_id` (required) - The ID of a project milestone  
74 -+ `title` (optional) - The title of a milestone  
75 -+ `description` (optional) - The description of a milestone  
76 -+ `due_date` (optional) - The due date of the milestone  
77 -+ `state_event` (optional) - The state event of the milestone (close|activate)  
78 - 69 +- `id` (required) - The ID of a project
  70 +- `milestone_id` (required) - The ID of a project milestone
  71 +- `title` (optional) - The title of a milestone
  72 +- `description` (optional) - The description of a milestone
  73 +- `due_date` (optional) - The due date of the milestone
  74 +- `state_event` (optional) - The state event of the milestone (close|activate)
doc/api/project_snippets.md
@@ -10,8 +10,7 @@ GET /projects/:id/snippets @@ -10,8 +10,7 @@ GET /projects/:id/snippets
10 10
11 Parameters: 11 Parameters:
12 12
13 -+ `id` (required) - The ID of a project  
14 - 13 +- `id` (required) - The ID of a project
15 14
16 ## Single snippet 15 ## Single snippet
17 16
@@ -23,8 +22,8 @@ GET /projects/:id/snippets/:snippet_id @@ -23,8 +22,8 @@ GET /projects/:id/snippets/:snippet_id
23 22
24 Parameters: 23 Parameters:
25 24
26 -+ `id` (required) - The ID of a project  
27 -+ `snippet_id` (required) - The ID of a project's snippet 25 +- `id` (required) - The ID of a project
  26 +- `snippet_id` (required) - The ID of a project's snippet
28 27
29 ```json 28 ```json
30 { 29 {
@@ -45,7 +44,6 @@ Parameters: @@ -45,7 +44,6 @@ Parameters:
45 } 44 }
46 ``` 45 ```
47 46
48 -  
49 ## Create new snippet 47 ## Create new snippet
50 48
51 Creates a new project snippet. The user must have permission to create new snippets. 49 Creates a new project snippet. The user must have permission to create new snippets.
@@ -56,11 +54,10 @@ POST /projects/:id/snippets @@ -56,11 +54,10 @@ POST /projects/:id/snippets
56 54
57 Parameters: 55 Parameters:
58 56
59 -+ `id` (required) - The ID of a project  
60 -+ `title` (required) - The title of a snippet  
61 -+ `file_name` (required) - The name of a snippet file  
62 -+ `code` (required) - The content of a snippet  
63 - 57 +- `id` (required) - The ID of a project
  58 +- `title` (required) - The title of a snippet
  59 +- `file_name` (required) - The name of a snippet file
  60 +- `code` (required) - The content of a snippet
64 61
65 ## Update snippet 62 ## Update snippet
66 63
@@ -72,12 +69,11 @@ PUT /projects/:id/snippets/:snippet_id @@ -72,12 +69,11 @@ PUT /projects/:id/snippets/:snippet_id
72 69
73 Parameters: 70 Parameters:
74 71
75 -+ `id` (required) - The ID of a project  
76 -+ `snippet_id` (required) - The ID of a project's snippet  
77 -+ `title` (optional) - The title of a snippet  
78 -+ `file_name` (optional) - The name of a snippet file  
79 -+ `code` (optional) - The content of a snippet  
80 - 72 +- `id` (required) - The ID of a project
  73 +- `snippet_id` (required) - The ID of a project's snippet
  74 +- `title` (optional) - The title of a snippet
  75 +- `file_name` (optional) - The name of a snippet file
  76 +- `code` (optional) - The content of a snippet
81 77
82 ## Delete snippet 78 ## Delete snippet
83 79
@@ -90,9 +86,8 @@ DELETE /projects/:id/snippets/:snippet_id @@ -90,9 +86,8 @@ DELETE /projects/:id/snippets/:snippet_id
90 86
91 Parameters: 87 Parameters:
92 88
93 -+ `id` (required) - The ID of a project  
94 -+ `snippet_id` (required) - The ID of a project's snippet  
95 - 89 +- `id` (required) - The ID of a project
  90 +- `snippet_id` (required) - The ID of a project's snippet
96 91
97 ## Snippet content 92 ## Snippet content
98 93
@@ -104,5 +99,5 @@ GET /projects/:id/snippets/:snippet_id/raw @@ -104,5 +99,5 @@ GET /projects/:id/snippets/:snippet_id/raw
104 99
105 Parameters: 100 Parameters:
106 101
107 -+ `id` (required) - The ID of a project  
108 -+ `snippet_id` (required) - The ID of a project's snippet 102 +- `id` (required) - The ID of a project
  103 +- `snippet_id` (required) - The ID of a project's snippet
doc/api/repository_files.md
@@ -4,12 +4,11 @@ @@ -4,12 +4,11 @@
4 4
5 ## Create, read, update and delete repository files using this API 5 ## Create, read, update and delete repository files using this API
6 6
7 -- - - 7 +---
8 8
9 ## Get file from repository 9 ## Get file from repository
10 10
11 -Allows you to receive information about file in repository like name, size, content.  
12 -Note that file content is Base64 encoded. 11 +Allows you to receive information about file in repository like name, size, content. Note that file content is Base64 encoded.
13 12
14 ``` 13 ```
15 GET /projects/:id/repository/files 14 GET /projects/:id/repository/files
@@ -32,8 +31,8 @@ Example response: @@ -32,8 +31,8 @@ Example response:
32 31
33 Parameters: 32 Parameters:
34 33
35 -+ `file_path` (required) - Full path to new file. Ex. lib/class.rb  
36 -+ `ref` (required) - The name of branch, tag or commit 34 +- `file_path` (required) - Full path to new file. Ex. lib/class.rb
  35 +- `ref` (required) - The name of branch, tag or commit
37 36
38 ## Create new file in repository 37 ## Create new file in repository
39 38
@@ -52,11 +51,11 @@ Example response: @@ -52,11 +51,11 @@ Example response:
52 51
53 Parameters: 52 Parameters:
54 53
55 -+ `file_path` (required) - Full path to new file. Ex. lib/class.rb  
56 -+ `branch_name` (required) - The name of branch  
57 -+ `encoding` (optional) - 'text' or 'base64'. Text is default.  
58 -+ `content` (required) - File content  
59 -+ `commit_message` (required) - Commit message 54 +- `file_path` (required) - Full path to new file. Ex. lib/class.rb
  55 +- `branch_name` (required) - The name of branch
  56 +- `encoding` (optional) - 'text' or 'base64'. Text is default.
  57 +- `content` (required) - File content
  58 +- `commit_message` (required) - Commit message
60 59
61 ## Update existing file in repository 60 ## Update existing file in repository
62 61
@@ -75,11 +74,11 @@ Example response: @@ -75,11 +74,11 @@ Example response:
75 74
76 Parameters: 75 Parameters:
77 76
78 -+ `file_path` (required) - Full path to file. Ex. lib/class.rb  
79 -+ `branch_name` (required) - The name of branch  
80 -+ `encoding` (optional) - 'text' or 'base64'. Text is default.  
81 -+ `content` (required) - New file content  
82 -+ `commit_message` (required) - Commit message 77 +- `file_path` (required) - Full path to file. Ex. lib/class.rb
  78 +- `branch_name` (required) - The name of branch
  79 +- `encoding` (optional) - 'text' or 'base64'. Text is default.
  80 +- `content` (required) - New file content
  81 +- `commit_message` (required) - Commit message
83 82
84 ## Delete existing file in repository 83 ## Delete existing file in repository
85 84
@@ -98,7 +97,6 @@ Example response: @@ -98,7 +97,6 @@ Example response:
98 97
99 Parameters: 98 Parameters:
100 99
101 -+ `file_path` (required) - Full path to file. Ex. lib/class.rb  
102 -+ `branch_name` (required) - The name of branch  
103 -+ `commit_message` (required) - Commit message  
104 - 100 +- `file_path` (required) - Full path to file. Ex. lib/class.rb
  101 +- `branch_name` (required) - The name of branch
  102 +- `commit_message` (required) - Commit message
doc/api/system_hooks.md
@@ -2,7 +2,7 @@ @@ -2,7 +2,7 @@
2 2
3 All methods require admin authorization. 3 All methods require admin authorization.
4 4
5 -The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks). 5 +The URL endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks).
6 6
7 ## List system hooks 7 ## List system hooks
8 8
@@ -14,7 +14,7 @@ GET /hooks @@ -14,7 +14,7 @@ GET /hooks
14 14
15 Parameters: 15 Parameters:
16 16
17 -+ **none** 17 +- **none**
18 18
19 ```json 19 ```json
20 [ 20 [
@@ -34,8 +34,7 @@ POST /hooks @@ -34,8 +34,7 @@ POST /hooks
34 34
35 Parameters: 35 Parameters:
36 36
37 -+ `url` (required) - The hook URL  
38 - 37 +- `url` (required) - The hook URL
39 38
40 ## Test system hook 39 ## Test system hook
41 40
@@ -45,7 +44,7 @@ GET /hooks/:id @@ -45,7 +44,7 @@ GET /hooks/:id
45 44
46 Parameters: 45 Parameters:
47 46
48 -+ `id` (required) - The ID of hook 47 +- `id` (required) - The ID of hook
49 48
50 ```json 49 ```json
51 { 50 {
@@ -60,8 +59,7 @@ Parameters: @@ -60,8 +59,7 @@ Parameters:
60 59
61 ## Delete system hook 60 ## Delete system hook
62 61
63 -Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the hook  
64 -is not available. If the hook is deleted it is also returned as JSON. 62 +Deletes a system hook. This is an idempotent API function and returns `200 Ok` even if the hook is not available. If the hook is deleted it is also returned as JSON.
65 63
66 ``` 64 ```
67 DELETE /hooks/:id 65 DELETE /hooks/:id
@@ -69,4 +67,4 @@ DELETE /hooks/:id @@ -69,4 +67,4 @@ DELETE /hooks/:id
69 67
70 Parameters: 68 Parameters:
71 69
72 -+ `id` (required) - The ID of hook 70 +- `id` (required) - The ID of hook
doc/api/users.md
@@ -3,6 +3,7 @@ @@ -3,6 +3,7 @@
3 ## List users 3 ## List users
4 4
5 Get a list of users. 5 Get a list of users.
  6 +
6 This function takes pagination parameters `page` and `per_page` to restrict the list of users. 7 This function takes pagination parameters `page` and `per_page` to restrict the list of users.
7 8
8 ``` 9 ```
@@ -53,8 +54,7 @@ GET /users @@ -53,8 +54,7 @@ GET /users
53 ] 54 ]
54 ``` 55 ```
55 56
56 -You can search for a users by email or username with:  
57 -`/users?search=John` 57 +You can search for a users by email or username with: `/users?search=John`
58 58
59 Also see `def search query` in `app/models/user.rb`. 59 Also see `def search query` in `app/models/user.rb`.
60 60
@@ -68,7 +68,7 @@ GET /users/:id @@ -68,7 +68,7 @@ GET /users/:id
68 68
69 Parameters: 69 Parameters:
70 70
71 -+ `id` (required) - The ID of a user 71 +- `id` (required) - The ID of a user
72 72
73 ```json 73 ```json
74 { 74 {
@@ -93,7 +93,6 @@ Parameters: @@ -93,7 +93,6 @@ Parameters:
93 } 93 }
94 ``` 94 ```
95 95
96 -  
97 ## User creation 96 ## User creation
98 97
99 Creates a new user. Note only administrators can create new users. 98 Creates a new user. Note only administrators can create new users.
@@ -104,21 +103,20 @@ POST /users @@ -104,21 +103,20 @@ POST /users
104 103
105 Parameters: 104 Parameters:
106 105
107 -+ `email` (required) - Email  
108 -+ `password` (required) - Password  
109 -+ `username` (required) - Username  
110 -+ `name` (required) - Name  
111 -+ `skype` (optional) - Skype ID  
112 -+ `linkedin` (optional) - Linkedin  
113 -+ `twitter` (optional) - Twitter account  
114 -+ `website_url` (optional) - Website url  
115 -+ `projects_limit` (optional) - Number of projects user can create  
116 -+ `extern_uid` (optional) - External UID  
117 -+ `provider` (optional) - External provider name  
118 -+ `bio` (optional) - User's bio  
119 -+ `admin` (optional) - User is admin - true or false (default)  
120 -+ `can_create_group` (optional) - User can create groups - true or false  
121 - 106 +- `email` (required) - Email
  107 +- `password` (required) - Password
  108 +- `username` (required) - Username
  109 +- `name` (required) - Name
  110 +- `skype` (optional) - Skype ID
  111 +- `linkedin` (optional) - Linkedin
  112 +- `twitter` (optional) - Twitter account
  113 +- `website_url` (optional) - Website url
  114 +- `projects_limit` (optional) - Number of projects user can create
  115 +- `extern_uid` (optional) - External UID
  116 +- `provider` (optional) - External provider name
  117 +- `bio` (optional) - User's bio
  118 +- `admin` (optional) - User is admin - true or false (default)
  119 +- `can_create_group` (optional) - User can create groups - true or false
122 120
123 ## User modification 121 ## User modification
124 122
@@ -130,30 +128,26 @@ PUT /users/:id @@ -130,30 +128,26 @@ PUT /users/:id
130 128
131 Parameters: 129 Parameters:
132 130
133 -+ `email` - Email  
134 -+ `username` - Username  
135 -+ `name` - Name  
136 -+ `password` - Password  
137 -+ `skype` - Skype ID  
138 -+ `linkedin` - Linkedin  
139 -+ `twitter` - Twitter account  
140 -+ `website_url` - Website url  
141 -+ `projects_limit` - Limit projects each user can create  
142 -+ `extern_uid` - External UID  
143 -+ `provider` - External provider name  
144 -+ `bio` - User's bio  
145 -+ `admin` (optional) - User is admin - true or false (default)  
146 -+ `can_create_group` (optional) - User can create groups - true or false  
147 -  
148 -Note, at the moment this method does only return a 404 error, even in cases where a 409 (Conflict) would  
149 -be more appropriate, e.g. when renaming the email address to some existing one.  
150 - 131 +- `email` - Email
  132 +- `username` - Username
  133 +- `name` - Name
  134 +- `password` - Password
  135 +- `skype` - Skype ID
  136 +- `linkedin` - Linkedin
  137 +- `twitter` - Twitter account
  138 +- `website_url` - Website url
  139 +- `projects_limit` - Limit projects each user can create
  140 +- `extern_uid` - External UID
  141 +- `provider` - External provider name
  142 +- `bio` - User's bio
  143 +- `admin` (optional) - User is admin - true or false (default)
  144 +- `can_create_group` (optional) - User can create groups - true or false
  145 +
  146 +Note, at the moment this method does only return a 404 error, even in cases where a 409 (Conflict) would be more appropriate, e.g. when renaming the email address to some existing one.
151 147
152 ## User deletion 148 ## User deletion
153 149
154 -Deletes a user. Available only for administrators. This is an idempotent function, calling this function  
155 -for a non-existent user id still returns a status code `200 Ok`. The JSON response differs if the user  
156 -was actually deleted or not. In the former the user is returned and in the latter not. 150 +Deletes a user. Available only for administrators. This is an idempotent function, calling this function for a non-existent user id still returns a status code `200 Ok`. The JSON response differs if the user was actually deleted or not. In the former the user is returned and in the latter not.
157 151
158 ``` 152 ```
159 DELETE /users/:id 153 DELETE /users/:id
@@ -161,8 +155,7 @@ DELETE /users/:id @@ -161,8 +155,7 @@ DELETE /users/:id
161 155
162 Parameters: 156 Parameters:
163 157
164 -+ `id` (required) - The ID of the user  
165 - 158 +- `id` (required) - The ID of the user
166 159
167 ## Current user 160 ## Current user
168 161
@@ -194,7 +187,6 @@ GET /user @@ -194,7 +187,6 @@ GET /user
194 } 187 }
195 ``` 188 ```
196 189
197 -  
198 ## List SSH keys 190 ## List SSH keys
199 191
200 Get a list of currently authenticated user's SSH keys. 192 Get a list of currently authenticated user's SSH keys.
@@ -220,7 +212,7 @@ GET /user/keys @@ -220,7 +212,7 @@ GET /user/keys
220 212
221 Parameters: 213 Parameters:
222 214
223 -+ **none** 215 +- **none**
224 216
225 ## List SSH keys for user 217 ## List SSH keys for user
226 218
@@ -232,8 +224,7 @@ GET /users/:uid/keys @@ -232,8 +224,7 @@ GET /users/:uid/keys
232 224
233 Parameters: 225 Parameters:
234 226
235 -+ `uid` (required) - id of specified user  
236 - 227 +- `uid` (required) - id of specified user
237 228
238 ## Single SSH key 229 ## Single SSH key
239 230
@@ -245,7 +236,7 @@ GET /user/keys/:id @@ -245,7 +236,7 @@ GET /user/keys/:id
245 236
246 Parameters: 237 Parameters:
247 238
248 -+ `id` (required) - The ID of an SSH key 239 +- `id` (required) - The ID of an SSH key
249 240
250 ```json 241 ```json
251 { 242 {
@@ -255,7 +246,6 @@ Parameters: @@ -255,7 +246,6 @@ Parameters:
255 } 246 }
256 ``` 247 ```
257 248
258 -  
259 ## Add SSH key 249 ## Add SSH key
260 250
261 Creates a new key owned by the currently authenticated user. 251 Creates a new key owned by the currently authenticated user.
@@ -266,9 +256,8 @@ POST /user/keys @@ -266,9 +256,8 @@ POST /user/keys
266 256
267 Parameters: 257 Parameters:
268 258
269 -+ `title` (required) - new SSH Key's title  
270 -+ `key` (required) - new SSH key  
271 - 259 +- `title` (required) - new SSH Key's title
  260 +- `key` (required) - new SSH key
272 261
273 ## Add SSH key for user 262 ## Add SSH key for user
274 263
@@ -280,17 +269,15 @@ POST /users/:id/keys @@ -280,17 +269,15 @@ POST /users/:id/keys
280 269
281 Parameters: 270 Parameters:
282 271
283 -+ `id` (required) - id of specified user  
284 -+ `title` (required) - new SSH Key's title  
285 -+ `key` (required) - new SSH key 272 +- `id` (required) - id of specified user
  273 +- `title` (required) - new SSH Key's title
  274 +- `key` (required) - new SSH key
286 275
287 -Will return created key with status `201 Created` on success, or `404 Not  
288 -found` on fail. 276 +Will return created key with status `201 Created` on success, or `404 Not found` on fail.
289 277
290 -## Delete SSH key 278 +## Delete SSH key for current user
291 279
292 -Deletes key owned by currently authenticated user. This is an idempotent function and calling it on a key that is already  
293 -deleted or not available results in `200 Ok`. 280 +Deletes key owned by currently authenticated user. This is an idempotent function and calling it on a key that is already deleted or not available results in `200 Ok`.
294 281
295 ``` 282 ```
296 DELETE /user/keys/:id 283 DELETE /user/keys/:id
@@ -298,9 +285,9 @@ DELETE /user/keys/:id @@ -298,9 +285,9 @@ DELETE /user/keys/:id
298 285
299 Parameters: 286 Parameters:
300 287
301 -+ `id` (required) - SSH key ID 288 +- `id` (required) - SSH key ID
302 289
303 -## Delete SSH key 290 +## Delete SSH key for given user
304 291
305 Deletes key owned by a specified user. Available only for admin. 292 Deletes key owned by a specified user. Available only for admin.
306 293
@@ -310,8 +297,7 @@ DELETE /users/:uid/keys/:id @@ -310,8 +297,7 @@ DELETE /users/:uid/keys/:id
310 297
311 Parameters: 298 Parameters:
312 299
313 -+ `uid` (required) - id of specified user  
314 -+ `id` (required) - SSH key ID 300 +- `uid` (required) - id of specified user
  301 +- `id` (required) - SSH key ID
315 302
316 Will return `200 Ok` on success, or `404 Not found` if either user or key cannot be found. 303 Will return `200 Ok` on success, or `404 Not found` if either user or key cannot be found.
317 -  
doc/development/README.md
1 -## Development 1 +# Development
2 2
3 -+ [Architecture](architecture.md) of GitLab  
4 -+ [Shell commands](shell_commands.md) in the GitLab codebase  
5 -+ [Rake tasks](rake_tasks.md) for development 3 +- [Architecture](architecture.md) of GitLab
  4 +- [Shell commands](shell_commands.md) in the GitLab codebase
  5 +- [Rake tasks](rake_tasks.md) for development
doc/development/architecture.md
1 # GitLab Architecture Overview 1 # GitLab Architecture Overview
2 ----  
3 2
4 -# Software delivery 3 +## Software delivery
5 4
6 -There are two editions of GitLab: [Enterprise Edition](https://www.gitlab.com/gitlab-ee/) (EE) and [Community Edition](https://www.gitlab.com/gitlab-ce/) (CE).  
7 -GitLab CE is delivered via git from the [gitlabhq repository](https://gitlab.com/gitlab-org/gitlab-ce/tree/master).  
8 -New versions of GitLab are released in stable branches and the master branch is for bleeding edge development. 5 +There are two editions of GitLab: [Enterprise Edition](https://www.gitlab.com/gitlab-ee/) (EE) and [Community Edition](https://www.gitlab.com/gitlab-ce/) (CE). GitLab CE is delivered via git from the [gitlabhq repository](https://gitlab.com/gitlab-org/gitlab-ce/tree/master). New versions of GitLab are released in stable branches and the master branch is for bleeding edge development.
9 6
10 -EE releases are available not long after CE releases.  
11 -To obtain the GitLab EE there is a [repository at gitlab.com](https://gitlab.com/subscribers/gitlab-ee).  
12 -For more information about the release process see the section 'New versions and upgrading' in the readme. 7 +EE releases are available not long after CE releases. To obtain the GitLab EE there is a [repository at gitlab.com](https://gitlab.com/subscribers/gitlab-ee). For more information about the release process see the section 'New versions and upgrading' in the readme.
13 8
14 -Both EE and CE require an add-on component called gitlab-shell.  
15 -It is obtained from the [gitlab-shell repository](https://gitlab.com/gitlab-org/gitlab-shell/tree/master).  
16 -New versions are usually tags but staying on the master branch will give you the latest stable version.  
17 -New releases are generally around the same time as GitLab CE releases with exception for informal security updates deemed critical. 9 +Both EE and CE require an add-on component called gitlab-shell. It is obtained from the [gitlab-shell repository](https://gitlab.com/gitlab-org/gitlab-shell/tree/master). New versions are usually tags but staying on the master branch will give you the latest stable version. New releases are generally around the same time as GitLab CE releases with exception for informal security updates deemed critical.
18 10
19 -# System Layout 11 +## System Layout
20 12
21 When referring to ~git in the pictures it means the home directory of the git user which is typically /home/git. 13 When referring to ~git in the pictures it means the home directory of the git user which is typically /home/git.
22 14
23 -GitLab is primarily installed within the `/home/git` user home directory as `git` user.  
24 -Within the home directory is where the gitlabhq server software resides as well as the repositories (though the repository location is configurable).  
25 -The bare repositories are located in `/home/git/repositories`.  
26 -GitLab is a ruby on rails application so the particulars of the inner workings can be learned by studying how a ruby on rails application works. 15 +GitLab is primarily installed within the `/home/git` user home directory as `git` user. Within the home directory is where the gitlabhq server software resides as well as the repositories (though the repository location is configurable).
  16 +
  17 +The bare repositories are located in `/home/git/repositories`. GitLab is a ruby on rails application so the particulars of the inner workings can be learned by studying how a ruby on rails application works.
  18 +
27 To serve repositories over SSH there's an add-on application called gitlab-shell which is installed in `/home/git/gitlab-shell`. 19 To serve repositories over SSH there's an add-on application called gitlab-shell which is installed in `/home/git/gitlab-shell`.
28 20
29 -## Components 21 +### Components
30 22
31 ![GitLab Diagram Overview](gitlab_diagram_overview.png) 23 ![GitLab Diagram Overview](gitlab_diagram_overview.png)
32 24
33 -A typical install of GitLab will be on Ubuntu Linux or RHEL/CentOS.  
34 -It uses Nginx or Apache as a web front end to proxypass the Unicorn web server.  
35 -By default, communication between Unicorn and the front end is via a Unix domain socket but forwarding requests via TCP is also supported.  
36 -The web front end accesses `/home/git/gitlab/public` bypassing the Unicorn server to serve static pages, uploads (e.g. avatar images or attachments), and precompiled assets.  
37 -GitLab serves web pages and a [GitLab API](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/api) using the Unicorn web server.  
38 -It uses Sidekiq as a job queue which, in turn, uses redis as a non-persistent database backend for job information, meta data, and incomming jobs.  
39 -The GitLab web app uses MySQL or PostgreSQL for persistent database information (e.g. users, permissions, issues, other meta data).  
40 -GitLab stores the bare git repositories it serves in `/home/git/repositories` by default.  
41 -It also keeps default branch and hook information with the bare repository.  
42 -`/home/git/gitlab-satellites` keeps checked out repositories when performing actions such as a merge request, editing files in the web interface, etc.  
43 -The satellite repository is used by the web interface for editing repositories and the wiki which is also a git repository.  
44 -When serving repositories over HTTP/HTTPS GitLab utilizes the GitLab API to resolve authorization and access as well as serving git objects.  
45 -  
46 -The add-on component gitlab-shell serves repositories over SSH.  
47 -It manages the SSH keys within `/home/git/.ssh/authorized_keys` which should not be manually edited.  
48 -gitlab-shell accesses the bare repositories directly to serve git objects and communicates with redis to submit jobs to Sidekiq for GitLab to process.  
49 - gitlab-shell queries the GitLab API to determine authorization and access.  
50 -  
51 -## Installation Folder Summary 25 +A typical install of GitLab will be on Ubuntu Linux or RHEL/CentOS. It uses Nginx or Apache as a web front end to proxypass the Unicorn web server. By default, communication between Unicorn and the front end is via a Unix domain socket but forwarding requests via TCP is also supported. The web front end accesses `/home/git/gitlab/public` bypassing the Unicorn server to serve static pages, uploads (e.g. avatar images or attachments), and precompiled assets. GitLab serves web pages and a [GitLab API](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/api) using the Unicorn web server. It uses Sidekiq as a job queue which, in turn, uses redis as a non-persistent database backend for job information, meta data, and incomming jobs.
52 26
53 -To summarize here's the [directory structure of the `git` user home directory](../install/structure.md). 27 +The GitLab web app uses MySQL or PostgreSQL for persistent database information (e.g. users, permissions, issues, other meta data). GitLab stores the bare git repositories it serves in `/home/git/repositories` by default. It also keeps default branch and hook information with the bare repository. `/home/git/gitlab-satellites` keeps checked out repositories when performing actions such as a merge request, editing files in the web interface, etc.
  28 +
  29 +The satellite repository is used by the web interface for editing repositories and the wiki which is also a git repository. When serving repositories over HTTP/HTTPS GitLab utilizes the GitLab API to resolve authorization and access as well as serving git objects.
54 30
  31 +The add-on component gitlab-shell serves repositories over SSH. It manages the SSH keys within `/home/git/.ssh/authorized_keys` which should not be manually edited. gitlab-shell accesses the bare repositories directly to serve git objects and communicates with redis to submit jobs to Sidekiq for GitLab to process. gitlab-shell queries the GitLab API to determine authorization and access.
  32 +
  33 +### Installation Folder Summary
  34 +
  35 +To summarize here's the [directory structure of the `git` user home directory](../install/structure.md).
55 36
56 -## Processes 37 +### Processes
57 38
58 ps aux | grep '^git' 39 ps aux | grep '^git'
59 40
60 -GitLab has several components to operate.  
61 -As a system user (i.e. any user that is not the `git` user) it requires a persistent database (MySQL/PostreSQL) and redis database.  
62 -It also uses Apache httpd or nginx to proxypass Unicorn.  
63 -As the `git` user it starts Sidekiq and Unicorn (a simple ruby HTTP server running on port `8080` by default).  
64 -Under the gitlab user there are normally 4 processes: `unicorn_rails master` (1 process), `unicorn_rails worker` (2 processes), `sidekiq` (1 process). 41 +GitLab has several components to operate. As a system user (i.e. any user that is not the `git` user) it requires a persistent database (MySQL/PostreSQL) and redis database. It also uses Apache httpd or nginx to proxypass Unicorn. As the `git` user it starts Sidekiq and Unicorn (a simple ruby HTTP server running on port `8080` by default). Under the gitlab user there are normally 4 processes: `unicorn_rails master` (1 process), `unicorn_rails worker` (2 processes), `sidekiq` (1 process).
65 42
66 -## Repository access 43 +### Repository access
67 44
68 -Repositories get accessed via HTTP or SSH.  
69 -HTTP cloning/push/pull utilizes the GitLab API and SSH cloning is handled by gitlab-shell (previously explained). 45 +Repositories get accessed via HTTP or SSH. HTTP cloning/push/pull utilizes the GitLab API and SSH cloning is handled by gitlab-shell (previously explained).
70 46
71 -# Troubleshooting 47 +## Troubleshooting
72 48
73 See the README for more information. 49 See the README for more information.
74 50
75 -## Init scripts of the services 51 +### Init scripts of the services
76 52
77 The GitLab init script starts and stops Unicorn and Sidekiq. 53 The GitLab init script starts and stops Unicorn and Sidekiq.
78 54
@@ -115,61 +91,59 @@ $ /etc/init.d/postgresql @@ -115,61 +91,59 @@ $ /etc/init.d/postgresql
115 Usage: /etc/init.d/postgresql {start|stop|restart|reload|force-reload|status} [version ..] 91 Usage: /etc/init.d/postgresql {start|stop|restart|reload|force-reload|status} [version ..]
116 ``` 92 ```
117 93
118 -## Log locations of the services 94 +### Log locations of the services
119 95
120 Note: `/home/git/` is shorthand for `/home/git`. 96 Note: `/home/git/` is shorthand for `/home/git`.
121 97
122 gitlabhq (includes Unicorn and Sidekiq logs) 98 gitlabhq (includes Unicorn and Sidekiq logs)
123 99
124 -* `/home/git/gitlab/log/` contains `application.log`, `production.log`, `sidekiq.log`, `unicorn.stdout.log`, `githost.log`, `satellites.log`, and `unicorn.stderr.log` normally. 100 +- `/home/git/gitlab/log/` contains `application.log`, `production.log`, `sidekiq.log`, `unicorn.stdout.log`, `githost.log`, `satellites.log`, and `unicorn.stderr.log` normally.
125 101
126 gitlab-shell 102 gitlab-shell
127 103
128 -* `/home/git/gitlab-shell/gitlab-shell.log` 104 +- `/home/git/gitlab-shell/gitlab-shell.log`
129 105
130 ssh 106 ssh
131 107
132 -* `/var/log/auth.log` auth log (on Ubuntu).  
133 -* `/var/log/secure` auth log (on RHEL). 108 +- `/var/log/auth.log` auth log (on Ubuntu).
  109 +- `/var/log/secure` auth log (on RHEL).
134 110
135 nginx 111 nginx
136 112
137 -* `/var/log/nginx/` contains error and access logs. 113 +- `/var/log/nginx/` contains error and access logs.
138 114
139 Apache httpd 115 Apache httpd
140 116
141 -* [Explanation of apache logs](http://httpd.apache.org/docs/2.2/logs.html).  
142 -* `/var/log/apache2/` contains error and output logs (on Ubuntu).  
143 -* `/var/log/httpd/` contains error and output logs (on RHEL). 117 +- [Explanation of apache logs](http://httpd.apache.org/docs/2.2/logs.html).
  118 +- `/var/log/apache2/` contains error and output logs (on Ubuntu).
  119 +- `/var/log/httpd/` contains error and output logs (on RHEL).
144 120
145 redis 121 redis
146 122
147 -* `/var/log/redis/redis.log` there are also logrotated logs there. 123 +- `/var/log/redis/redis.log` there are also logrotated logs there.
148 124
149 PostgreSQL 125 PostgreSQL
150 126
151 -* `/var/log/postgresql/*` 127 +- `/var/log/postgresql/*`
152 128
153 MySQL 129 MySQL
154 130
155 -* `/var/log/mysql/*`  
156 -* `/var/log/mysql.*` 131 +- `/var/log/mysql/*`
  132 +- `/var/log/mysql.*`
157 133
158 -## GitLab specific config files 134 +### GitLab specific config files
159 135
160 -GitLab has configuration files located in `/home/git/gitlab/config/*`.  
161 -Commonly referenced config files include: 136 +GitLab has configuration files located in `/home/git/gitlab/config/*`. Commonly referenced config files include:
162 137
163 -* `gitlab.yml` - GitLab configuration.  
164 -* `unicorn.rb` - Unicorn web server settings.  
165 -* `database.yml` - Database connection settings. 138 +- `gitlab.yml` - GitLab configuration.
  139 +- `unicorn.rb` - Unicorn web server settings.
  140 +- `database.yml` - Database connection settings.
166 141
167 gitlab-shell has a configuration file at `/home/git/gitlab-shell/config.yml`. 142 gitlab-shell has a configuration file at `/home/git/gitlab-shell/config.yml`.
168 143
169 -## Maintenance Tasks 144 +### Maintenance Tasks
170 145
171 -[GitLab](https://gitlab.com/gitlab-org/gitlab-ce/tree/master) provides rake tasks with which you see version information and run a quick check on your configuration to ensure it is configured properly within the application.  
172 -See [maintenance rake tasks](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/maintenance.md). 146 +[GitLab](https://gitlab.com/gitlab-org/gitlab-ce/tree/master) provides rake tasks with which you see version information and run a quick check on your configuration to ensure it is configured properly within the application. See [maintenance rake tasks](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/raketasks/maintenance.md).
173 In a nutshell, do the following: 147 In a nutshell, do the following:
174 148
175 ``` 149 ```
@@ -179,5 +153,4 @@ bundle exec rake gitlab:env:info RAILS_ENV=production @@ -179,5 +153,4 @@ bundle exec rake gitlab:env:info RAILS_ENV=production
179 bundle exec rake gitlab:check RAILS_ENV=production 153 bundle exec rake gitlab:check RAILS_ENV=production
180 ``` 154 ```
181 155
182 -Note: It is recommended to log into the `git` user using `sudo -i -u git` or `sudo su - git`.  
183 -While the sudo commands provided by gitlabhq work in Ubuntu they do not always work in RHEL.  
184 \ No newline at end of file 156 \ No newline at end of file
  157 +Note: It is recommended to log into the `git` user using `sudo -i -u git` or `sudo su - git`. While the sudo commands provided by gitlabhq work in Ubuntu they do not always work in RHEL.
doc/development/shell_commands.md
@@ -8,9 +8,7 @@ @@ -8,9 +8,7 @@
8 8
9 ## Use File and FileUtils instead of shell commands 9 ## Use File and FileUtils instead of shell commands
10 10
11 -Sometimes we invoke basic Unix commands via the shell when there is also a Ruby API for doing it.  
12 -Use the Ruby API if it exists.  
13 -http://www.ruby-doc.org/stdlib-2.0.0/libdoc/fileutils/rdoc/FileUtils.html#module-FileUtils-label-Module+Functions 11 +Sometimes we invoke basic Unix commands via the shell when there is also a Ruby API for doing it. Use the Ruby API if it exists. <http://www.ruby-doc.org/stdlib-2.0.0/libdoc/fileutils/rdoc/FileUtils.html#module-FileUtils-label-Module+Functions>
14 12
15 ```ruby 13 ```ruby
16 # Wrong 14 # Wrong
@@ -30,12 +28,7 @@ This coding style could have prevented CVE-2013-4490. @@ -30,12 +28,7 @@ This coding style could have prevented CVE-2013-4490.
30 28
31 ## Bypass the shell by splitting commands into separate tokens 29 ## Bypass the shell by splitting commands into separate tokens
32 30
33 -When we pass shell commands as a single string to Ruby, Ruby will let `/bin/sh` evaluate the entire string.  
34 -Essentially, we are asking the shell to evaluate a one-line script.  
35 -This creates a risk for shell injection attacks.  
36 -It is better to split the shell command into tokens ourselves.  
37 -Sometimes we use the scripting capabilities of the shell to change the working directory or set environment variables.  
38 -All of this can also be achieved securely straight from Ruby 31 +When we pass shell commands as a single string to Ruby, Ruby will let `/bin/sh` evaluate the entire string. Essentially, we are asking the shell to evaluate a one-line script. This creates a risk for shell injection attacks. It is better to split the shell command into tokens ourselves. Sometimes we use the scripting capabilities of the shell to change the working directory or set environment variables. All of this can also be achieved securely straight from Ruby
39 32
40 ```ruby 33 ```ruby
41 # Wrong 34 # Wrong
@@ -55,8 +48,7 @@ This coding style could have prevented CVE-2013-4546. @@ -55,8 +48,7 @@ This coding style could have prevented CVE-2013-4546.
55 48
56 ## Separate options from arguments with -- 49 ## Separate options from arguments with --
57 50
58 -Make the difference between options and arguments clear to the argument parsers of system commands with `--`.  
59 -This is supported by many but not all Unix commands. 51 +Make the difference between options and arguments clear to the argument parsers of system commands with `--`. This is supported by many but not all Unix commands.
60 52
61 To understand what `--` does, consider the problem below. 53 To understand what `--` does, consider the problem below.
62 54
@@ -68,9 +60,7 @@ cat: illegal option -- l @@ -68,9 +60,7 @@ cat: illegal option -- l
68 usage: cat [-benstuv] [file ...] 60 usage: cat [-benstuv] [file ...]
69 ``` 61 ```
70 62
71 -In the example above, the argument parser of `cat` assumes that `-l` is an option.  
72 -The solution in the example above is to make it clear to `cat` that `-l` is really an argument, not an option.  
73 -Many Unix command line tools follow the convention of separating options from arguments with `--`. 63 +In the example above, the argument parser of `cat` assumes that `-l` is an option. The solution in the example above is to make it clear to `cat` that `-l` is really an argument, not an option. Many Unix command line tools follow the convention of separating options from arguments with `--`.
74 64
75 ``` 65 ```
76 # Example (continued) 66 # Example (continued)
@@ -91,9 +81,7 @@ This coding style could have prevented CVE-2013-4582. @@ -91,9 +81,7 @@ This coding style could have prevented CVE-2013-4582.
91 81
92 ## Do not use the backticks 82 ## Do not use the backticks
93 83
94 -Capturing the output of shell commands with backticks reads nicely, but you are forced to pass the command as one string to the shell.  
95 -We explained above that this is unsafe.  
96 -In the main GitLab codebase, the solution is to use `Gitlab::Popen.popen` instead. 84 +Capturing the output of shell commands with backticks reads nicely, but you are forced to pass the command as one string to the shell. We explained above that this is unsafe. In the main GitLab codebase, the solution is to use `Gitlab::Popen.popen` instead.
97 85
98 ```ruby 86 ```ruby
99 # Wrong 87 # Wrong
doc/install/README.md
1 -+ [Installation](installation.md)  
2 -+ [Requirements](requirements.md)  
3 -+ [Structure](structure.md)  
4 -+ [Database MySQL](database_mysql.md) 1 +# Installation
  2 +
  3 +- [Installation](installation.md)
  4 +- [Requirements](requirements.md)
  5 +- [Structure](structure.md)
  6 +- [Database MySQL](database_mysql.md)
doc/install/installation.md
1 # Installation 1 # Installation
2 2
3 -# Select Version to Install  
4 -Make sure you view [this installation guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) from the branch (version) of GitLab you would like to install. In most cases  
5 -this should be the highest numbered stable branch (example shown below). 3 +## Select Version to Install
  4 +
  5 +Make sure you view [this installation guide](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/doc/install/installation.md) from the branch (version) of GitLab you would like to install. In most cases this should be the highest numbered stable branch (example shown below).
6 6
7 ![capture](http://i.imgur.com/d2AlIVj.png) 7 ![capture](http://i.imgur.com/d2AlIVj.png)
8 8
9 If the highest number stable branch is unclear please check the [GitLab Blog](https://www.gitlab.com/blog/) for installation guide links by version. 9 If the highest number stable branch is unclear please check the [GitLab Blog](https://www.gitlab.com/blog/) for installation guide links by version.
10 10
11 -# Important notes 11 +## Important notes
12 12
13 This guide is long because it covers many cases and includes all commands you need, this is [one of the few installation scripts that actually works out of the box](https://twitter.com/robinvdvleuten/status/424163226532986880). 13 This guide is long because it covers many cases and includes all commands you need, this is [one of the few installation scripts that actually works out of the box](https://twitter.com/robinvdvleuten/status/424163226532986880).
14 14
@@ -20,21 +20,18 @@ The following steps have been known to work. Please **use caution when you devia @@ -20,21 +20,18 @@ The following steps have been known to work. Please **use caution when you devia
20 20
21 If you find a bug/error in this guide please **submit a merge request** following the [contributing guide](../../CONTRIBUTING.md). 21 If you find a bug/error in this guide please **submit a merge request** following the [contributing guide](../../CONTRIBUTING.md).
22 22
23 -- - -  
24 -  
25 -# Overview 23 +## Overview
26 24
27 The GitLab installation consists of setting up the following components: 25 The GitLab installation consists of setting up the following components:
28 26
29 1. Packages / Dependencies 27 1. Packages / Dependencies
30 -2. Ruby  
31 -3. System Users  
32 -4. Database  
33 -5. GitLab  
34 -6. Nginx  
35 - 28 +1. Ruby
  29 +1. System Users
  30 +1. Database
  31 +1. GitLab
  32 +1. Nginx
36 33
37 -# 1. Packages / Dependencies 34 +## 1. Packages / Dependencies
38 35
39 `sudo` is not installed on Debian by default. Make sure your system is 36 `sudo` is not installed on Debian by default. Make sure your system is
40 up-to-date and install it. 37 up-to-date and install it.
@@ -44,10 +41,7 @@ up-to-date and install it. @@ -44,10 +41,7 @@ up-to-date and install it.
44 apt-get upgrade -y 41 apt-get upgrade -y
45 apt-get install sudo -y 42 apt-get install sudo -y
46 43
47 -**Note:**  
48 -During this installation some files will need to be edited manually.  
49 -If you are familiar with vim set it as default editor with the commands below.  
50 -If you are not familiar with vim please skip this and keep using the default editor. 44 +**Note:** During this installation some files will need to be edited manually. If you are familiar with vim set it as default editor with the commands below. If you are not familiar with vim please skip this and keep using the default editor.
51 45
52 # Install vim and set as default editor 46 # Install vim and set as default editor
53 sudo apt-get install -y vim 47 sudo apt-get install -y vim
@@ -84,15 +78,13 @@ Is the system packaged Git too old? Remove it and compile from source. @@ -84,15 +78,13 @@ Is the system packaged Git too old? Remove it and compile from source.
84 78
85 # When editing config/gitlab.yml (Step 6), change the git bin_path to /usr/local/bin/git 79 # When editing config/gitlab.yml (Step 6), change the git bin_path to /usr/local/bin/git
86 80
87 -**Note:** In order to receive mail notifications, make sure to install a  
88 -mail server. By default, Debian is shipped with exim4 whereas Ubuntu  
89 -does not ship with one. The recommended mail server is postfix and you can install it with: 81 +**Note:** In order to receive mail notifications, make sure to install a mail server. By default, Debian is shipped with exim4 whereas Ubuntu does not ship with one. The recommended mail server is postfix and you can install it with:
90 82
91 sudo apt-get install -y postfix 83 sudo apt-get install -y postfix
92 84
93 Then select 'Internet Site' and press enter to confirm the hostname. 85 Then select 'Internet Site' and press enter to confirm the hostname.
94 86
95 -# 2. Ruby 87 +## 2. Ruby
96 88
97 The use of ruby version managers such as [RVM](http://rvm.io/), [rbenv](https://github.com/sstephenson/rbenv) or [chruby](https://github.com/postmodern/chruby) with GitLab in production frequently leads to hard to diagnose problems. For example, GitLab Shell is called from OpenSSH and having a version manager can prevent pushing and pulling over SSH. Version managers are not supported and we stronly advise everyone to follow the instructions below to use a system ruby. 89 The use of ruby version managers such as [RVM](http://rvm.io/), [rbenv](https://github.com/sstephenson/rbenv) or [chruby](https://github.com/postmodern/chruby) with GitLab in production frequently leads to hard to diagnose problems. For example, GitLab Shell is called from OpenSSH and having a version manager can prevent pushing and pulling over SSH. Version managers are not supported and we stronly advise everyone to follow the instructions below to use a system ruby.
98 90
@@ -113,17 +105,15 @@ Install the Bundler Gem: @@ -113,17 +105,15 @@ Install the Bundler Gem:
113 105
114 sudo gem install bundler --no-ri --no-rdoc 106 sudo gem install bundler --no-ri --no-rdoc
115 107
116 -  
117 -# 3. System Users 108 +## 3. System Users
118 109
119 Create a `git` user for Gitlab: 110 Create a `git` user for Gitlab:
120 111
121 sudo adduser --disabled-login --gecos 'GitLab' git 112 sudo adduser --disabled-login --gecos 'GitLab' git
122 113
123 -# 4. Database 114 +## 4. Database
124 115
125 -We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](database_mysql.md).  
126 -NOTE: because we need to make use of extensions you need at least pgsql 9.1. 116 +We recommend using a PostgreSQL database. For MySQL check [MySQL setup guide](database_mysql.md). *Note*: because we need to make use of extensions you need at least pgsql 9.1.
127 117
128 # Install the database packages 118 # Install the database packages
129 sudo apt-get install -y postgresql-9.1 postgresql-client libpq-dev 119 sudo apt-get install -y postgresql-9.1 postgresql-client libpq-dev
@@ -143,13 +133,12 @@ NOTE: because we need to make use of extensions you need at least pgsql 9.1. @@ -143,13 +133,12 @@ NOTE: because we need to make use of extensions you need at least pgsql 9.1.
143 # Try connecting to the new database with the new user 133 # Try connecting to the new database with the new user
144 sudo -u git -H psql -d gitlabhq_production 134 sudo -u git -H psql -d gitlabhq_production
145 135
146 -  
147 -# 5. GitLab 136 +## 5. GitLab
148 137
149 # We'll install GitLab into home directory of the user "git" 138 # We'll install GitLab into home directory of the user "git"
150 cd /home/git 139 cd /home/git
151 140
152 -## Clone the Source 141 +### Clone the Source
153 142
154 # Clone GitLab repository 143 # Clone GitLab repository
155 sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 6-9-stable gitlab 144 sudo -u git -H git clone https://gitlab.com/gitlab-org/gitlab-ce.git -b 6-9-stable gitlab
@@ -157,10 +146,9 @@ NOTE: because we need to make use of extensions you need at least pgsql 9.1. @@ -157,10 +146,9 @@ NOTE: because we need to make use of extensions you need at least pgsql 9.1.
157 # Go to gitlab dir 146 # Go to gitlab dir
158 cd /home/git/gitlab 147 cd /home/git/gitlab
159 148
160 -**Note:**  
161 -You can change `6-9-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server! 149 +**Note:** You can change `6-9-stable` to `master` if you want the *bleeding edge* version, but never install master on a production server!
162 150
163 -## Configure it 151 +### Configure it
164 152
165 cd /home/git/gitlab 153 cd /home/git/gitlab
166 154
@@ -206,10 +194,9 @@ You can change `6-9-stable` to `master` if you want the *bleeding edge* version, @@ -206,10 +194,9 @@ You can change `6-9-stable` to `master` if you want the *bleeding edge* version,
206 sudo -u git -H git config --global user.email "example@example.com" 194 sudo -u git -H git config --global user.email "example@example.com"
207 sudo -u git -H git config --global core.autocrlf input 195 sudo -u git -H git config --global core.autocrlf input
208 196
209 -**Important Note:**  
210 -Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. 197 +**Important Note:** Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
211 198
212 -## Configure GitLab DB settings 199 +### Configure GitLab DB settings
213 200
214 # PostgreSQL only: 201 # PostgreSQL only:
215 sudo -u git cp config/database.yml.postgresql config/database.yml 202 sudo -u git cp config/database.yml.postgresql config/database.yml
@@ -229,14 +216,9 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup. @@ -229,14 +216,9 @@ Make sure to edit both `gitlab.yml` and `unicorn.rb` to match your setup.
229 # Make config/database.yml readable to git only 216 # Make config/database.yml readable to git only
230 sudo -u git -H chmod o-rwx config/database.yml 217 sudo -u git -H chmod o-rwx config/database.yml
231 218
232 -## Install Gems 219 +### Install Gems
233 220
234 -**Note:** As of bundler 1.5.2, you can invoke `bundle install -jN`  
235 -(where `N` the number of your processor cores) and enjoy the parallel gems installation with measurable  
236 -difference in completion time (~60% faster). Check the number of your cores with `nproc`.  
237 -For more information check this [post](http://robots.thoughtbot.com/parallel-gem-installing-using-bundler).  
238 -First make sure you have bundler >= 1.5.2 (run `bundle -v`) as it addresses some [issues](https://devcenter.heroku.com/changelog-items/411)  
239 -that were [fixed](https://github.com/bundler/bundler/pull/2817) in 1.5.2. 221 +**Note:** As of bundler 1.5.2, you can invoke `bundle install -jN` (where `N` the number of your processor cores) and enjoy the parallel gems installation with measurable difference in completion time (~60% faster). Check the number of your cores with `nproc`. For more information check this [post](http://robots.thoughtbot.com/parallel-gem-installing-using-bundler). First make sure you have bundler >= 1.5.2 (run `bundle -v`) as it addresses some [issues](https://devcenter.heroku.com/changelog-items/411) that were [fixed](https://github.com/bundler/bundler/pull/2817) in 1.5.2.
240 222
241 cd /home/git/gitlab 223 cd /home/git/gitlab
242 224
@@ -246,7 +228,7 @@ that were [fixed](https://github.com/bundler/bundler/pull/2817) in 1.5.2. @@ -246,7 +228,7 @@ that were [fixed](https://github.com/bundler/bundler/pull/2817) in 1.5.2.
246 # Or if you use MySQL (note, the option says "without ... postgres") 228 # Or if you use MySQL (note, the option says "without ... postgres")
247 sudo -u git -H bundle install --deployment --without development test postgres aws 229 sudo -u git -H bundle install --deployment --without development test postgres aws
248 230
249 -## Install GitLab shell 231 +### Install GitLab shell
250 232
251 GitLab Shell is an ssh access and repository management software developed specially for GitLab. 233 GitLab Shell is an ssh access and repository management software developed specially for GitLab.
252 234
@@ -259,8 +241,7 @@ GitLab Shell is an ssh access and repository management software developed speci @@ -259,8 +241,7 @@ GitLab Shell is an ssh access and repository management software developed speci
259 # By default, the gitlab-shell config is generated from your main gitlab config. You can review (and modify) it as follows: 241 # By default, the gitlab-shell config is generated from your main gitlab config. You can review (and modify) it as follows:
260 sudo -u git -H editor /home/git/gitlab-shell/config.yml 242 sudo -u git -H editor /home/git/gitlab-shell/config.yml
261 243
262 -  
263 -## Initialize Database and Activate Advanced Features 244 +### Initialize Database and Activate Advanced Features
264 245
265 sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production 246 sudo -u git -H bundle exec rake gitlab:setup RAILS_ENV=production
266 247
@@ -268,7 +249,7 @@ GitLab Shell is an ssh access and repository management software developed speci @@ -268,7 +249,7 @@ GitLab Shell is an ssh access and repository management software developed speci
268 249
269 # When done you see 'Administrator account created:' 250 # When done you see 'Administrator account created:'
270 251
271 -## Install Init Script 252 +### Install Init Script
272 253
273 Download the init script (will be /etc/init.d/gitlab): 254 Download the init script (will be /etc/init.d/gitlab):
274 255
@@ -284,37 +265,34 @@ Make GitLab start on boot: @@ -284,37 +265,34 @@ Make GitLab start on boot:
284 265
285 sudo update-rc.d gitlab defaults 21 266 sudo update-rc.d gitlab defaults 21
286 267
287 -## Set up logrotate 268 +### Set up logrotate
288 269
289 sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab 270 sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
290 271
291 -## Check Application Status 272 +### Check Application Status
292 273
293 Check if GitLab and its environment are configured correctly: 274 Check if GitLab and its environment are configured correctly:
294 275
295 sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production 276 sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production
296 277
297 -## Compile assets 278 +### Compile assets
298 279
299 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 280 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
300 281
301 -## Start Your GitLab Instance 282 +### Start Your GitLab Instance
302 283
303 sudo service gitlab start 284 sudo service gitlab start
304 # or 285 # or
305 sudo /etc/init.d/gitlab restart 286 sudo /etc/init.d/gitlab restart
306 287
  288 +## 6. Nginx
307 289
308 -# 6. Nginx  
309 -  
310 -**Note:**  
311 -Nginx is the officially supported web server for GitLab. If you cannot or do not want to use Nginx as your web server, have a look at the  
312 -[GitLab recipes](https://gitlab.com/gitlab-org/gitlab-recipes/). 290 +**Note:** Nginx is the officially supported web server for GitLab. If you cannot or do not want to use Nginx as your web server, have a look at the [GitLab recipes](https://gitlab.com/gitlab-org/gitlab-recipes/).
313 291
314 -## Installation 292 +### Installation
315 sudo apt-get install -y nginx 293 sudo apt-get install -y nginx
316 294
317 -## Site Configuration 295 +### Site Configuration
318 296
319 Download an example site config: 297 Download an example site config:
320 298
@@ -327,14 +305,13 @@ Make sure to edit the config file to match your setup: @@ -327,14 +305,13 @@ Make sure to edit the config file to match your setup:
327 # domain name of your host serving GitLab. 305 # domain name of your host serving GitLab.
328 sudo editor /etc/nginx/sites-available/gitlab 306 sudo editor /etc/nginx/sites-available/gitlab
329 307
330 -## Restart 308 +### Restart
331 309
332 sudo service nginx restart 310 sudo service nginx restart
333 311
  312 +## Done!
334 313
335 -# Done!  
336 -  
337 -## Double-check Application Status 314 +### Double-check Application Status
338 315
339 To make sure you didn't miss anything run a more thorough check with: 316 To make sure you didn't miss anything run a more thorough check with:
340 317
@@ -342,51 +319,38 @@ To make sure you didn&#39;t miss anything run a more thorough check with: @@ -342,51 +319,38 @@ To make sure you didn&#39;t miss anything run a more thorough check with:
342 319
343 If all items are green, then congratulations on successfully installing GitLab! 320 If all items are green, then congratulations on successfully installing GitLab!
344 321
345 -## Initial Login 322 +### Initial Login
346 323
347 -Visit YOUR_SERVER in your web browser for your first GitLab login.  
348 -The setup has created an admin account for you. You can use it to log in: 324 +Visit YOUR_SERVER in your web browser for your first GitLab login. The setup has created an admin account for you. You can use it to log in:
349 325
350 root 326 root
351 5iveL!fe 327 5iveL!fe
352 328
353 -**Important Note:**  
354 -Please go over to your profile page and immediately change the password, so  
355 -nobody can access your GitLab by using this login information later on. 329 +**Important Note:** Please go over to your profile page and immediately change the password, so nobody can access your GitLab by using this login information later on.
356 330
357 **Enjoy!** 331 **Enjoy!**
358 332
  333 +## Advanced Setup Tips
359 334
360 -- - -  
361 - 335 +### Additional markup styles
362 336
363 -# Advanced Setup Tips  
364 -  
365 -## Additional markup styles  
366 -  
367 -Apart from the always supported markdown style there are other rich text files that GitLab can display.  
368 -But you might have to install a dependency to do so.  
369 -Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information.  
370 -For example, reStructuredText markup language support requires python-docutils: 337 +Apart from the always supported markdown style there are other rich text files that GitLab can display. But you might have to install a dependency to do so. Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. For example, reStructuredText markup language support requires python-docutils:
371 338
372 sudo apt-get install -y python-docutils 339 sudo apt-get install -y python-docutils
373 340
374 -## Custom Redis Connection 341 +### Custom Redis Connection
375 342
376 -If you'd like Resque to connect to a Redis server on a non-standard port or on  
377 -a different host, you can configure its connection string via the  
378 -`config/resque.yml` file. 343 +If you'd like Resque to connect to a Redis server on a non-standard port or on a different host, you can configure its connection string via the `config/resque.yml` file.
379 344
380 # example 345 # example
381 production: redis://redis.example.tld:6379 346 production: redis://redis.example.tld:6379
382 347
383 -If you want to connect the Redis server via socket, then use the "unix:" URL scheme  
384 -and the path to the Redis socket file in the `config/resque.yml` file. 348 +If you want to connect the Redis server via socket, then use the "unix:" URL scheme and the path to the Redis socket file in the `config/resque.yml` file.
385 349
386 # example 350 # example
387 production: unix:/path/to/redis/socket 351 production: unix:/path/to/redis/socket
388 352
389 -## Custom SSH Connection 353 +### Custom SSH Connection
390 354
391 If you are running SSH on a non-standard port, you must change the gitlab user's SSH config. 355 If you are running SSH on a non-standard port, you must change the gitlab user's SSH config.
392 356
@@ -398,39 +362,44 @@ If you are running SSH on a non-standard port, you must change the gitlab user&#39;s @@ -398,39 +362,44 @@ If you are running SSH on a non-standard port, you must change the gitlab user&#39;s
398 362
399 You also need to change the corresponding options (e.g. ssh_user, ssh_host, admin_uri) in the `config\gitlab.yml` file. 363 You also need to change the corresponding options (e.g. ssh_user, ssh_host, admin_uri) in the `config\gitlab.yml` file.
400 364
401 -## LDAP authentication 365 +### LDAP authentication
402 366
403 You can configure LDAP authentication in config/gitlab.yml. Please restart GitLab after editing this file. 367 You can configure LDAP authentication in config/gitlab.yml. Please restart GitLab after editing this file.
404 368
405 -## Using Custom Omniauth Providers 369 +### Using Custom Omniauth Providers
406 370
407 GitLab uses [Omniauth](http://www.omniauth.org/) for authentication and already ships with a few providers preinstalled (e.g. LDAP, GitHub, Twitter). But sometimes that is not enough and you need to integrate with other authentication solutions. For these cases you can use the Omniauth provider. 371 GitLab uses [Omniauth](http://www.omniauth.org/) for authentication and already ships with a few providers preinstalled (e.g. LDAP, GitHub, Twitter). But sometimes that is not enough and you need to integrate with other authentication solutions. For these cases you can use the Omniauth provider.
408 372
409 -### Steps 373 +#### Steps
410 374
411 These steps are fairly general and you will need to figure out the exact details from the Omniauth provider's documentation. 375 These steps are fairly general and you will need to figure out the exact details from the Omniauth provider's documentation.
412 376
413 -* Stop GitLab  
414 - `sudo service gitlab stop` 377 +- Stop GitLab:
  378 +
  379 + sudo service gitlab stop
  380 +
  381 +- Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile):
415 382
416 -* Add provider specific configuration options to your `config/gitlab.yml` (you can use the [auth providers section of the example config](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example) as a reference) 383 + gem "omniauth-your-auth-provider"
417 384
418 -* Add the gem to your [Gemfile](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/Gemfile)  
419 - `gem "omniauth-your-auth-provider"`  
420 -* If you're using MySQL, install the new Omniauth provider gem by running the following command:  
421 - `sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment` 385 +- If you're using MySQL, install the new Omniauth provider gem by running the following command:
422 386
423 -* If you're using PostgreSQL, install the new Omniauth provider gem by running the following command:  
424 - `sudo -u git -H bundle install --without development test mysql --path vendor/bundle --no-deployment` 387 + sudo -u git -H bundle install --without development test postgres --path vendor/bundle --no-deployment
425 388
426 -> These are the same commands you used in the [Install Gems section](#install-gems) with `--path vendor/bundle --no-deployment` instead of `--deployment`. 389 +- If you're using PostgreSQL, install the new Omniauth provider gem by running the following command:
427 390
428 -* Start GitLab  
429 - `sudo service gitlab start` 391 + sudo -u git -H bundle install --without development test mysql --path vendor/bundle --no-deployment
430 392
  393 + > These are the same commands you used in the [Install Gems section](#install-gems) with `--path vendor/bundle --no-deployment` instead of `--deployment`.
431 394
432 -### Examples 395 +- Start GitLab:
  396 +
  397 + `sudo service gitlab start`
  398 +
  399 +#### Examples
433 400
434 If you have successfully set up a provider that is not shipped with GitLab itself, please let us know. 401 If you have successfully set up a provider that is not shipped with GitLab itself, please let us know.
  402 +
435 You can help others by reporting successful configurations and probably share a few insights or provide warnings for common errors or pitfalls by sharing your experience [in the public Wiki](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations). 403 You can help others by reporting successful configurations and probably share a few insights or provide warnings for common errors or pitfalls by sharing your experience [in the public Wiki](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Custom-omniauth-provider-configurations).
  404 +
436 While we can't officially support every possible auth mechanism out there, we'd like to at least help those with special needs. 405 While we can't officially support every possible auth mechanism out there, we'd like to at least help those with special needs.
doc/install/requirements.md
@@ -4,7 +4,7 @@ @@ -4,7 +4,7 @@
4 4
5 GitLab is developed for the Linux operating system. For the installations options and instructions please see [the installation section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#installation). 5 GitLab is developed for the Linux operating system. For the installations options and instructions please see [the installation section of the readme](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/README.md#installation).
6 6
7 -## Supported Linux distributions 7 +### Supported Linux distributions
8 8
9 - Ubuntu 9 - Ubuntu
10 - Debian 10 - Debian
@@ -13,37 +13,42 @@ GitLab is developed for the Linux operating system. For the installations option @@ -13,37 +13,42 @@ GitLab is developed for the Linux operating system. For the installations option
13 - Scientific Linux 13 - Scientific Linux
14 - Oracle Linux 14 - Oracle Linux
15 15
16 -## Unsupported Linux distributions 16 +### Unsupported Linux distributions
17 17
18 - Arch Linux 18 - Arch Linux
19 - Fedora 19 - Fedora
20 - Gentoo 20 - Gentoo
21 21
22 -But on the above unsupported distributions is stll possible to install GitLab yourself with the [manual installation guide](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md). 22 +But on the above unsupported distributions is still possible to install GitLab yourself with the [manual installation guide](https://github.com/gitlabhq/gitlabhq/blob/master/doc/install/installation.md).
23 23
24 -## Unsupported Unix operating systems 24 +### Unsupported Unix operating systems
25 25
26 There is nothing that prevents GitLab from running on other Unix operating systems. 26 There is nothing that prevents GitLab from running on other Unix operating systems.
  27 +
27 This means you may get it to work on systems running FreeBSD or OS X. 28 This means you may get it to work on systems running FreeBSD or OS X.
  29 +
28 If you want to do this, please be aware it could be a lot of work. 30 If you want to do this, please be aware it could be a lot of work.
  31 +
29 Please consider using a virtual machine to run GitLab. 32 Please consider using a virtual machine to run GitLab.
30 33
31 -## Other operating systems such as Windows 34 +### Other operating systems such as Windows
32 35
33 GitLab does **not** run on Windows and we have no plans of supporting it in the near future. 36 GitLab does **not** run on Windows and we have no plans of supporting it in the near future.
34 -Please consider using a virtual machine to run GitLab.  
35 37
  38 +Please consider using a virtual machine to run GitLab.
36 39
37 -# Ruby versions 40 +## Ruby versions
38 41
39 GitLab requires Ruby (MRI) 2.0+. 42 GitLab requires Ruby (MRI) 2.0+.
  43 +
  44 +>>>>>>> Update docs to markdown style guide.
40 You will have to use the standard MRI implementation of Ruby. 45 You will have to use the standard MRI implementation of Ruby.
41 -We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions.  
42 46
  47 +We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions.
43 48
44 -# Hardware requirements 49 +## Hardware requirements
45 50
46 -## CPU 51 +### CPU
47 52
48 - 1 core works supports up to 100 users but the application will not be responsive 53 - 1 core works supports up to 100 users but the application will not be responsive
49 - **2 cores** is the **recommended** number of cores and supports up to 500 users 54 - **2 cores** is the **recommended** number of cores and supports up to 500 users
@@ -53,7 +58,7 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab @@ -53,7 +58,7 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab
53 - 32 cores supports up to 20,000 users 58 - 32 cores supports up to 20,000 users
54 - 64 cores supports up to 40,000 users 59 - 64 cores supports up to 40,000 users
55 60
56 -## Memory 61 +### Memory
57 62
58 - 512MB is the absolute minimum, you need 256MB of swap, you can configure only one slow unicorn worker, only ssh access will work, we do not recommend this 63 - 512MB is the absolute minimum, you need 256MB of swap, you can configure only one slow unicorn worker, only ssh access will work, we do not recommend this
59 - 1GB supports up to 100 users (with individual repositories under 250MB, otherwise git memory usage necessitates using swap space) 64 - 1GB supports up to 100 users (with individual repositories under 250MB, otherwise git memory usage necessitates using swap space)
@@ -64,11 +69,9 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab @@ -64,11 +69,9 @@ We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab
64 - 32GB supports up to 20,000 users 69 - 32GB supports up to 20,000 users
65 - 64GB supports up to 40,000 users 70 - 64GB supports up to 40,000 users
66 71
67 -## Storage 72 +### Storage
68 73
69 -The necessary hard drive space largely depends on the size of the repos you want  
70 -to store in GitLab. But as a *rule of thumb* you should have at least twice as much  
71 -free space as your all repos combined take up. You need twice the storage because [GitLab satellites](structure.md) contain an extra copy of each repo. 74 +The necessary hard drive space largely depends on the size of the repos you want to store in GitLab. But as a *rule of thumb* you should have at least twice as much free space as your all repos combined take up. You need twice the storage because [GitLab satellites](structure.md) contain an extra copy of each repo.
72 75
73 If you want to be flexible about growing your hard drive space in the future consider mounting it using LVM so you can add more hard drives when you need them. 76 If you want to be flexible about growing your hard drive space in the future consider mounting it using LVM so you can add more hard drives when you need them.
74 77
@@ -80,7 +83,7 @@ If you have enough RAM memory and a recent CPU the speed of GitLab is mainly lim @@ -80,7 +83,7 @@ If you have enough RAM memory and a recent CPU the speed of GitLab is mainly lim
80 83
81 If you want to run the database separately, the **recommended** database size is **1 MB per user** 84 If you want to run the database separately, the **recommended** database size is **1 MB per user**
82 85
83 -# Supported webbrowsers 86 +## Supported webbrowsers
84 87
85 - Chrome (Latest stable version) 88 - Chrome (Latest stable version)
86 - Firefox (Latest released version) 89 - Firefox (Latest released version)
doc/integration/README.md
1 # GitLab Integration 1 # GitLab Integration
2 2
3 GitLab integrates with multiple third-party services to allow external issue trackers and external authentication. 3 GitLab integrates with multiple third-party services to allow external issue trackers and external authentication.
  4 +
4 See the documentation below for details on how to configure these services. 5 See the documentation below for details on how to configure these services.
5 6
6 -+ [External issue tracker](external-issue-tracker.md) Redmine, JIRA, etc.  
7 -+ [LDAP](ldap.md) Set up sign in via LDAP  
8 -+ [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, and Google via OAuth.  
9 -+ [Slack](slack.md) Integrate with the Slack chat service 7 +- [External issue tracker](external-issue-tracker.md) Redmine, JIRA, etc.
  8 +- [LDAP](ldap.md) Set up sign in via LDAP
  9 +- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, and Google via OAuth.
  10 +- [Slack](slack.md) Integrate with the Slack chat service
10 11
11 Jenkins support is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jenkins.html). 12 Jenkins support is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jenkins.html).
doc/integration/external-issue-tracker.md
  1 +# External issue tracker
  2 +
1 GitLab has a great issue tracker but you can also use an external issue tracker such as JIRA or Redmine. This is something that you can turn on per GitLab project. If for example you configure JIRA it provides the following functionality: 3 GitLab has a great issue tracker but you can also use an external issue tracker such as JIRA or Redmine. This is something that you can turn on per GitLab project. If for example you configure JIRA it provides the following functionality:
2 4
3 - the 'Issues' link on the GitLab project pages takes you to the appropriate JIRA issue index; 5 - the 'Issues' link on the GitLab project pages takes you to the appropriate JIRA issue index;
doc/integration/github.md
@@ -2,18 +2,24 @@ @@ -2,18 +2,24 @@
2 2
3 To enable the GitHub OmniAuth provider you must register your application with GitHub. GitHub will generate a client ID and secret key for you to use. 3 To enable the GitHub OmniAuth provider you must register your application with GitHub. GitHub will generate a client ID and secret key for you to use.
4 4
5 -1. Sign in to GitHub.  
6 -2. Navigate to your individual user settings or an organization's settings, depending on how you want the application registered. It does not matter if the application is registered as an individual or an organization - that is entirely up to you.  
7 -3. Select "Applications" in the left menu.  
8 -4. Select "Register new application".  
9 -5. Provide the required details.  
10 - * Application name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or something else descriptive.  
11 - * Homepage URL: The URL to your GitLab installation. 'https://gitlab.company.com'  
12 - * Application description: Fill this in if you wish.  
13 - * Authorization callback URL: 'https://gitlab.company.com/users/auth/github/callback'  
14 -6. Select "Register application".  
15 -7. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png)  
16 -8. On your GitLab server, open the configuration file. 5 +1. Sign in to GitHub.
  6 +
  7 +1. Navigate to your individual user settings or an organization's settings, depending on how you want the application registered. It does not matter if the application is registered as an individual or an organization - that is entirely up to you.
  8 +
  9 +1. Select "Applications" in the left menu.
  10 +
  11 +1. Select "Register new application".
  12 +
  13 +1. Provide the required details.
  14 + - Application name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or something else descriptive.
  15 + - Homepage URL: The URL to your GitLab installation. 'https://gitlab.company.com'
  16 + - Application description: Fill this in if you wish.
  17 + - Authorization callback URL: 'https://gitlab.company.com/users/auth/github/callback'
  18 +1. Select "Register application".
  19 +
  20 +1. You should now see a Client ID and Client Secret near the top right of the page (see screenshot). Keep this page open as you continue configuration. ![GitHub app](github_app.png)
  21 +
  22 +1. On your GitLab server, open the configuration file.
17 23
18 ```sh 24 ```sh
19 cd /home/git/gitlab 25 cd /home/git/gitlab
@@ -21,8 +27,9 @@ To enable the GitHub OmniAuth provider you must register your application with G @@ -21,8 +27,9 @@ To enable the GitHub OmniAuth provider you must register your application with G
21 sudo -u git -H editor config/gitlab.yml 27 sudo -u git -H editor config/gitlab.yml
22 ``` 28 ```
23 29
24 -9. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.  
25 -10. Under `providers:` uncomment (or add) lines that look like the following: 30 +1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.
  31 +
  32 +1. Under `providers:` uncomment (or add) lines that look like the following:
26 33
27 ``` 34 ```
28 - { name: 'github', app_id: 'YOUR APP ID', 35 - { name: 'github', app_id: 'YOUR APP ID',
@@ -30,9 +37,12 @@ To enable the GitHub OmniAuth provider you must register your application with G @@ -30,9 +37,12 @@ To enable the GitHub OmniAuth provider you must register your application with G
30 args: { scope: 'user:email' } } 37 args: { scope: 'user:email' } }
31 ``` 38 ```
32 39
33 -11. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.  
34 -12. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.  
35 -13. Save the configuration file.  
36 -14. Restart GitLab for the changes to take effect. 40 +1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
  41 +
  42 +1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
  43 +
  44 +1. Save the configuration file.
  45 +
  46 +1. Restart GitLab for the changes to take effect.
37 47
38 On the sign in page there should now be a GitHub icon below the regular sign in form. Click the icon to begin the authentication process. GitHub will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in. 48 On the sign in page there should now be a GitHub icon below the regular sign in form. Click the icon to begin the authentication process. GitHub will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
doc/integration/google.md
@@ -2,28 +2,38 @@ @@ -2,28 +2,38 @@
2 2
3 To enable the Google OAuth2 OmniAuth provider you must register your application with Google. Google will generate a client ID and secret key for you to use. 3 To enable the Google OAuth2 OmniAuth provider you must register your application with Google. Google will generate a client ID and secret key for you to use.
4 4
5 -1. Sign in to the [Google Developers Console](https://console.developers.google.com/) with the Google account you want to use to register GitLab.  
6 -2. Select "Create Project".  
7 -3. Provide the project information  
8 - * Project name: 'GitLab' works just fine here.  
9 - * Project ID: Must be unique to all Google Developer registered applications. Google provides a randomly generated Project ID by default. You can use the randomly generated ID or choose a new one.  
10 -4. Refresh the page. You should now see your new project in the list. Click on the project.  
11 -5. Select "APIs & auth" in the left menu.  
12 -6. Select "Credentials" in the submenu.  
13 -7. Select "Create New Client ID".  
14 -8. Fill in the required information  
15 - * Application type: "Web Application"  
16 - * Authorized JavaScript origins: This isn't really used by GitLab but go ahead and put 'https://gitlab.example.com' here.  
17 - * Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback'  
18 -9. Under the heading "Client ID for web application" you should see a Client ID and Client secret (see screenshot). Keep this page open as you continue configuration. ![Google app](google_app.png)  
19 -10. On your GitLab server, open the configuration file. 5 +1. Sign in to the [Google Developers Console](https://console.developers.google.com/) with the Google account you want to use to register GitLab.
  6 +
  7 +1. Select "Create Project".
  8 +
  9 +1. Provide the project information
  10 + - Project name: 'GitLab' works just fine here.
  11 + - Project ID: Must be unique to all Google Developer registered applications. Google provides a randomly generated Project ID by default. You can use the randomly generated ID or choose a new one.
  12 +1. Refresh the page. You should now see your new project in the list. Click on the project.
  13 +
  14 +1. Select "APIs & auth" in the left menu.
  15 +
  16 +1. Select "Credentials" in the submenu.
  17 +
  18 +1. Select "Create New Client ID".
  19 +
  20 +1. Fill in the required information
  21 + - Application type: "Web Application"
  22 + - Authorized JavaScript origins: This isn't really used by GitLab but go ahead and put 'https://gitlab.example.com' here.
  23 + - Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback'
  24 +1. Under the heading "Client ID for web application" you should see a Client ID and Client secret (see screenshot). Keep this page open as you continue configuration. ![Google app](google_app.png)
  25 +
  26 +1. On your GitLab server, open the configuration file.
  27 +
20 ```sh 28 ```sh
21 cd /home/git/gitlab 29 cd /home/git/gitlab
22 30
23 sudo -u git -H editor config/gitlab.yml 31 sudo -u git -H editor config/gitlab.yml
24 ``` 32 ```
25 -11. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.  
26 -12. Under `providers:` uncomment (or add) lines that look like the following: 33 +
  34 +1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.
  35 +
  36 +1. Under `providers:` uncomment (or add) lines that look like the following:
27 37
28 ``` 38 ```
29 - { name: 'google_oauth2', app_id: 'YOUR APP ID', 39 - { name: 'google_oauth2', app_id: 'YOUR APP ID',
@@ -31,10 +41,13 @@ To enable the Google OAuth2 OmniAuth provider you must register your application @@ -31,10 +41,13 @@ To enable the Google OAuth2 OmniAuth provider you must register your application
31 args: { access_type: 'offline', approval_prompt: '' } } 41 args: { access_type: 'offline', approval_prompt: '' } }
32 ``` 42 ```
33 43
34 -13. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.  
35 -14. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.  
36 -15. Save the configuration file.  
37 -16. Restart GitLab for the changes to take effect. 44 +1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
  45 +
  46 +1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
  47 +
  48 +1. Save the configuration file.
  49 +
  50 +1. Restart GitLab for the changes to take effect.
38 51
39 On the sign in page there should now be a Google icon below the regular sign in form. Click the icon to begin the authentication process. Google will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in. 52 On the sign in page there should now be a Google icon below the regular sign in form. Click the icon to begin the authentication process. Google will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
40 53
@@ -45,5 +58,5 @@ This further configuration is not required for Google authentication to function @@ -45,5 +58,5 @@ This further configuration is not required for Google authentication to function
45 At this point, when users first try to authenticate to your GitLab installation with Google they will see a generic application name on the prompt screen. The prompt informs the user that "Project Default Service Account" would like to access their account. "Project Default Service Account" isn't very recognizable and may confuse or cause users to be concerned. This is easily changeable. 58 At this point, when users first try to authenticate to your GitLab installation with Google they will see a generic application name on the prompt screen. The prompt informs the user that "Project Default Service Account" would like to access their account. "Project Default Service Account" isn't very recognizable and may confuse or cause users to be concerned. This is easily changeable.
46 59
47 1. Select 'Consent screen' in the left menu. (See steps 1, 4 and 5 above for instructions on how to get here if you closed your window). 60 1. Select 'Consent screen' in the left menu. (See steps 1, 4 and 5 above for instructions on how to get here if you closed your window).
48 -2. Scroll down until you find "Product Name". Change the product name to something more descriptive.  
49 -3. Add any additional information as you wish - homepage, logo, privacy policy, etc. None of this is required, but it may help your users. 61 +1. Scroll down until you find "Product Name". Change the product name to something more descriptive.
  62 +1. Add any additional information as you wish - homepage, logo, privacy policy, etc. None of this is required, but it may help your users.
doc/integration/ldap.md
1 # GitLab LDAP integration 1 # GitLab LDAP integration
2 2
3 GitLab can be configured to allow your users to sign with their LDAP credentials to integrate with e.g. Active Directory. 3 GitLab can be configured to allow your users to sign with their LDAP credentials to integrate with e.g. Active Directory.
  4 +
4 The first time a user signs in with LDAP credentials, GitLab will create a new GitLab user associated with the LDAP Distinguished Name (DN) of the LDAP user. 5 The first time a user signs in with LDAP credentials, GitLab will create a new GitLab user associated with the LDAP Distinguished Name (DN) of the LDAP user.
  6 +
5 GitLab user attributes such as nickname and email will be copied from the LDAP user entry. 7 GitLab user attributes such as nickname and email will be copied from the LDAP user entry.
6 8
7 ## Enabling LDAP sign-in for existing GitLab users 9 ## Enabling LDAP sign-in for existing GitLab users
8 10
9 When a user signs in to GitLab with LDAP for the first time, and their LDAP email address is the primary email address of an existing GitLab user, then the LDAP DN will be associated with the existing user. 11 When a user signs in to GitLab with LDAP for the first time, and their LDAP email address is the primary email address of an existing GitLab user, then the LDAP DN will be associated with the existing user.
  12 +
10 If the LDAP email attribute is not found in GitLab's database, a new user is created. 13 If the LDAP email attribute is not found in GitLab's database, a new user is created.
11 14
12 In other words, if an existing GitLab user wants to enable LDAP sign-in for themselves, they should check that their GitLab email address matches their LDAP email address, and then sign into GitLab via their LDAP credentials. 15 In other words, if an existing GitLab user wants to enable LDAP sign-in for themselves, they should check that their GitLab email address matches their LDAP email address, and then sign into GitLab via their LDAP credentials.
  16 +
13 GitLab recognizes the following LDAP attributes as email addresses: `mail`, `email` and `userPrincipalName`. 17 GitLab recognizes the following LDAP attributes as email addresses: `mail`, `email` and `userPrincipalName`.
  18 +
14 If multiple LDAP email attributes are present, e.g. `mail: foo@bar.com` and `email: foo@example.com`, then the first attribute found wins -- in this case `foo@bar.com`. 19 If multiple LDAP email attributes are present, e.g. `mail: foo@bar.com` and `email: foo@example.com`, then the first attribute found wins -- in this case `foo@bar.com`.
doc/integration/omniauth.md
1 # OmniAuth 1 # OmniAuth
2 2
3 GitLab leverages OmniAuth to allow users to sign in using Twitter, GitHub, and other popular services. Configuring 3 GitLab leverages OmniAuth to allow users to sign in using Twitter, GitHub, and other popular services. Configuring
4 -OmniAuth does not prevent standard GitLab authentication or LDAP (if configured) from continuing to work. Users can  
5 -choose to sign in using any of the configured mechanisms.  
6 4
7 -+ [Initial OmniAuth Configuration](#initial-omniauth-configuration)  
8 -+ [Supported Providers](#supported-providers)  
9 -+ [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user) 5 +OmniAuth does not prevent standard GitLab authentication or LDAP (if configured) from continuing to work. Users can choose to sign in using any of the configured mechanisms.
10 6
11 -### Initial OmniAuth Configuration 7 +- [Initial OmniAuth Configuration](#initial-omniauth-configuration)
  8 +- [Supported Providers](#supported-providers)
  9 +- [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
  10 +
  11 +## Initial OmniAuth Configuration
12 12
13 Before configuring individual OmniAuth providers there are a few global settings that need to be verified. 13 Before configuring individual OmniAuth providers there are a few global settings that need to be verified.
14 14
15 -1. Open the configuration file<br /> 15 +1. Open the configuration file.
16 16
17 ```sh 17 ```sh
18 cd /home/git/gitlab 18 cd /home/git/gitlab
@@ -20,7 +20,7 @@ Before configuring individual OmniAuth providers there are a few global settings @@ -20,7 +20,7 @@ Before configuring individual OmniAuth providers there are a few global settings
20 sudo -u git -H editor config/gitlab.yml 20 sudo -u git -H editor config/gitlab.yml
21 ``` 21 ```
22 22
23 -2. Find the section dealing with OmniAuth. The section will look similar to the following.<br /> 23 +1. Find the section dealing with OmniAuth. The section will look similar to the following.
24 24
25 ``` 25 ```
26 ## OmniAuth settings 26 ## OmniAuth settings
@@ -52,32 +52,33 @@ Before configuring individual OmniAuth providers there are a few global settings @@ -52,32 +52,33 @@ Before configuring individual OmniAuth providers there are a few global settings
52 # args: { scope: 'user:email' } } 52 # args: { scope: 'user:email' } }
53 ``` 53 ```
54 54
55 -3. Change `enabled` to `true`.  
56 -4. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`.  
57 - * `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to 55 +1. Change `enabled` to `true`.
  56 +
  57 +1. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`.
  58 +
  59 + - `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to
58 sign in via OmniAuth. 60 sign in via OmniAuth.
59 - * `block_auto_created_users` defaults to `true`. If `true` auto created users will be blocked by default and will 61 + - `block_auto_created_users` defaults to `true`. If `true` auto created users will be blocked by default and will
60 have to be unblocked by an administrator before they are able to sign in. 62 have to be unblocked by an administrator before they are able to sign in.
61 - * **Note:** If you set `allow_single_sign_on` to `true` and `block_auto_created_users` to `false` please be aware 63 + - **Note:** If you set `allow_single_sign_on` to `true` and `block_auto_created_users` to `false` please be aware
62 that any user on the Internet will be able to successfully sign in to your GitLab without administrative approval. 64 that any user on the Internet will be able to successfully sign in to your GitLab without administrative approval.
63 -5. Choose one or more of the Supported Providers below to continue configuration.  
64 65
65 -### Supported Providers 66 +1. Choose one or more of the Supported Providers below to continue configuration.
  67 +
  68 +## Supported Providers
66 69
67 -+ [GitHub](github.md)  
68 -+ [Google](google.md)  
69 -+ [Twitter](twitter.md) 70 +- [GitHub](github.md)
  71 +- [Google](google.md)
  72 +- [Twitter](twitter.md)
70 73
71 -### Enable OmniAuth for an Existing User 74 +## Enable OmniAuth for an Existing User
72 75
73 -Existing users can enable OmniAuth for specific providers after the account is created. For example, if the user  
74 -originally signed in with LDAP an OmniAuth provider such as Twitter can be enabled. Follow the steps below to enable an  
75 -OmniAuth provider for an existing user. 76 +Existing users can enable OmniAuth for specific providers after the account is created. For example, if the user originally signed in with LDAP an OmniAuth provider such as Twitter can be enabled. Follow the steps below to enable an OmniAuth provider for an existing user.
76 77
77 1. Sign in normally - whether standard sign in, LDAP, or another OmniAuth provider. 78 1. Sign in normally - whether standard sign in, LDAP, or another OmniAuth provider.
78 -2. Go to profile settings (the silhouette icon in the top right corner).  
79 -3. Select the "Account" tab.  
80 -4. Under "Social Accounts" select the desired OmniAuth provider, such as Twitter.  
81 -5. The user will be redirected to the provider. Once the user authorized GitLab they will be redirected back to GitLab. 79 +1. Go to profile settings (the silhouette icon in the top right corner).
  80 +1. Select the "Account" tab.
  81 +1. Under "Social Accounts" select the desired OmniAuth provider, such as Twitter.
  82 +1. The user will be redirected to the provider. Once the user authorized GitLab they will be redirected back to GitLab.
82 83
83 The chosen OmniAuth provider is now active and can be used to sign in to GitLab from then on. 84 The chosen OmniAuth provider is now active and can be used to sign in to GitLab from then on.
doc/integration/slack.md
1 -# Slack integration 1 +# Slack integration
2 2
3 -### On Slack 3 +## On Slack
4 4
5 To enable Slack integration you must create an Incoming WebHooks integration on Slack; 5 To enable Slack integration you must create an Incoming WebHooks integration on Slack;
6 6
7 -  
8 -1. Sign in to [Slack](https://slack.com) (https://YOURSUBDOMAIN.slack.com/services)  
9 -2. Click on the Integrations menu at the top of the page.  
10 -3. Add a new Integration.  
11 -4. Pick Incoming WebHooks  
12 -5. Choose the channel name you want to send notifications to, in the Settings section  
13 -6. Add Integrations.  
14 - * Optional step; You can change bot's name and avatar by clicking "change the name of your bot", and "change the icon" after that you have to click "Save settings". 7 +1. Sign in to [Slack](https://slack.com) (https://YOURSUBDOMAIN.slack.com/services)
  8 +1. Click on the Integrations menu at the top of the page.
  9 +1. Add a new Integration.
  10 +1. Pick Incoming WebHooks
  11 +1. Choose the channel name you want to send notifications to, in the Settings section
  12 +1. Add Integrations.
  13 + - Optional step; You can change bot's name and avatar by clicking "change the name of your bot", and "change the icon" after that you have to click "Save settings".
15 14
16 Now, Slack is ready to get external hooks. Before you leave this page don't forget to get the Token that you'll need on GitLab. You can find it by clicking Expand button, located in the "Instructions for creating Incoming WebHooks" section. It's a random alpha-numeric text 24 characters long. 15 Now, Slack is ready to get external hooks. Before you leave this page don't forget to get the Token that you'll need on GitLab. You can find it by clicking Expand button, located in the "Instructions for creating Incoming WebHooks" section. It's a random alpha-numeric text 24 characters long.
17 16
18 -### On GitLab 17 +## On GitLab
19 18
20 After Slack is ready we need to setup GitLab. Here are the steps to achieve this. 19 After Slack is ready we need to setup GitLab. Here are the steps to achieve this.
21 20
  21 +1. Sign in to GitLab
  22 +
  23 +1. Pick the repository you want.
  24 +
  25 +1. Navigate to Settings -> Services -> Slack
  26 +
  27 +1. Fill in your Slack details
22 28
23 -1. Sign in to GitLab  
24 -2. Pick the repository you want.  
25 -3. Navigate to Settings -> Services -> Slack  
26 -4. Fill in your Slack details  
27 - * Mark as active it  
28 - * Type your subdomain's prefix (If your subdomain is https://somedomain.slack.com you only have to type the somedomain)  
29 - * Type in the token you got from Slack  
30 - * Type in the channel name you want to use (eg. #announcements) 29 + - Mark as active it
  30 + - Type your subdomain's prefix (If your subdomain is https://somedomain.slack.com you only have to type the somedomain)
  31 + - Type in the token you got from Slack
  32 + - Type in the channel name you want to use (eg. #announcements)
31 33
32 Have fun :) 34 Have fun :)
33 35
34 -_P.S. You can set "branch,pushed,Compare changes" as highlight words on your Slack profile settings, so that you can be aware of new commits when somebody pushes them._ 36 +*P.S. You can set "branch,pushed,Compare changes" as highlight words on your Slack profile settings, so that you can be aware of new commits when somebody pushes them.*
doc/integration/twitter.md
1 # Twitter OAuth2 OmniAuth Provider 1 # Twitter OAuth2 OmniAuth Provider
2 2
3 -To enable the Twitter OmniAuth provider you must register your application with Twitter. Twitter will generate a client  
4 -ID and secret key for you to use.  
5 -  
6 -1. Sign in to [Twitter Developers](https://dev.twitter.com/) area.  
7 -2. Hover over the avatar in the top right corner and select "My applications."  
8 -3. Select "Create new app"  
9 -4. Fill in the application details.  
10 - * Name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or 3 +To enable the Twitter OmniAuth provider you must register your application with Twitter. Twitter will generate a client ID and secret key for you to use.
  4 +
  5 +1. Sign in to [Twitter Developers](https://dev.twitter.com/) area.
  6 +
  7 +1. Hover over the avatar in the top right corner and select "My applications."
  8 +
  9 +1. Select "Create new app"
  10 +
  11 +1. Fill in the application details.
  12 + - Name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or
11 something else descriptive. 13 something else descriptive.
12 - * Description: Create a description.  
13 - * Website: The URL to your GitLab installation. 'https://gitlab.example.com'  
14 - * Callback URL: 'https://gitlab.example.com/users/auth/github/callback'  
15 - * Agree to the "Rules of the Road." 14 + - Description: Create a description.
  15 + - Website: The URL to your GitLab installation. 'https://gitlab.example.com'
  16 + - Callback URL: 'https://gitlab.example.com/users/auth/github/callback'
  17 + - Agree to the "Rules of the Road."
  18 +
16 ![Twitter App Details](twitter_app_details.png) 19 ![Twitter App Details](twitter_app_details.png)
17 -6. Select "Create your Twitter application."  
18 -7. Select the "Settings" tab.  
19 -8. Underneath the Callback URL check the box next to "Allow this application to be used to Sign in the Twitter."  
20 -9. Select "Update settings" at the bottom to save changes.  
21 -10. Select the "API Keys" tab.  
22 -11. You should now see an API key and API secret (see screenshot). Keep this page open as you continue configuration.  
23 -![Twitter app](twitter_app_api_keys.png)  
24 -12. On your GitLab server, open the configuration file. 20 +1. Select "Create your Twitter application."
  21 +
  22 +1. Select the "Settings" tab.
  23 +
  24 +1. Underneath the Callback URL check the box next to "Allow this application to be used to Sign in the Twitter."
  25 +
  26 +1. Select "Update settings" at the bottom to save changes.
  27 +
  28 +1. Select the "API Keys" tab.
  29 +
  30 +1. You should now see an API key and API secret (see screenshot). Keep this page open as you continue configuration.
  31 +
  32 + ![Twitter app](twitter_app_api_keys.png)
  33 +
  34 +1. On your GitLab server, open the configuration file.
25 35
26 ```sh 36 ```sh
27 cd /home/git/gitlab 37 cd /home/git/gitlab
@@ -29,19 +39,22 @@ ID and secret key for you to use. @@ -29,19 +39,22 @@ ID and secret key for you to use.
29 sudo -u git -H editor config/gitlab.yml 39 sudo -u git -H editor config/gitlab.yml
30 ``` 40 ```
31 41
32 -13. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) 42 +1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration)
33 for more details. 43 for more details.
34 -14. Under `providers:` uncomment (or add) lines that look like the following: 44 +
  45 +1. Under `providers:` uncomment (or add) lines that look like the following:
35 46
36 ``` 47 ```
37 - { name: 'twitter', app_id: 'YOUR APP ID', 48 - { name: 'twitter', app_id: 'YOUR APP ID',
38 app_secret: 'YOUR APP SECRET' } 49 app_secret: 'YOUR APP SECRET' }
39 ``` 50 ```
40 51
41 -15. Change 'YOUR APP ID' to the API key from Twitter page in step 11.  
42 -16. Change 'YOUR APP SECRET' to the API secret from the Twitter page in step 11.  
43 -17. Save the configuration file.  
44 -18. Restart GitLab for the changes to take effect. 52 +1. Change 'YOUR APP ID' to the API key from Twitter page in step 11.
  53 +
  54 +1. Change 'YOUR APP SECRET' to the API secret from the Twitter page in step 11.
  55 +
  56 +1. Save the configuration file.
  57 +
  58 +1. Restart GitLab for the changes to take effect.
45 59
46 -On the sign in page there should now be a Twitter icon below the regular sign in form. Click the icon to begin the  
47 -authentication process. Twitter will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in. 60 +On the sign in page there should now be a Twitter icon below the regular sign in form. Click the icon to begin the authentication process. Twitter will ask the user to sign in and authorize the GitLab application. If everything goes well the user will be returned to GitLab and will be signed in.
doc/legal/README.md
1 -+ [Corporate contributor license agreement](corporate_contributor_license_agreement.md)  
2 -+ [Individual contributor license agreement](individual_contributor_license_agreement.md) 1 +# Legal
  2 +
  3 +- [Corporate contributor license agreement](corporate_contributor_license_agreement.md)
  4 +- [Individual contributor license agreement](individual_contributor_license_agreement.md)
doc/legal/corporate_contributor_license_agreement.md
@@ -2,26 +2,24 @@ @@ -2,26 +2,24 @@
2 2
3 You accept and agree to the following terms and conditions for Your present and future Contributions submitted to GitLab B.V.. Except for the license granted herein to GitLab B.V. and recipients of software distributed by GitLab B.V., You reserve all right, title, and interest in and to Your Contributions. 3 You accept and agree to the following terms and conditions for Your present and future Contributions submitted to GitLab B.V.. Except for the license granted herein to GitLab B.V. and recipients of software distributed by GitLab B.V., You reserve all right, title, and interest in and to Your Contributions.
4 4
5 -1. Definitions. 5 +1. Definitions.
6 6
7 "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with GitLab B.V.. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 7 "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with GitLab B.V.. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
8 8
9 "Contribution" shall mean the code, documentation or other original works of authorship expressly identified in Schedule B, as well as any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to GitLab B.V. for inclusion in, or documentation of, any of the products owned or managed by GitLab B.V. (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to GitLab B.V. or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, GitLab B.V. for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." 9 "Contribution" shall mean the code, documentation or other original works of authorship expressly identified in Schedule B, as well as any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to GitLab B.V. for inclusion in, or documentation of, any of the products owned or managed by GitLab B.V. (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to GitLab B.V. or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, GitLab B.V. for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
10 10
11 -2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. 11 +2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
12 12
13 -3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. 13 +3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
14 14
15 -4. You represent that You are legally entitled to grant the above license. You represent further that each employee of the Corporation designated on Schedule A below (or in a subsequent written modification to that Schedule) is authorized to submit Contributions on behalf of the Corporation. 15 +4. You represent that You are legally entitled to grant the above license. You represent further that each employee of the Corporation designated on Schedule A below (or in a subsequent written modification to that Schedule) is authorized to submit Contributions on behalf of the Corporation.
16 16
17 -5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). 17 +5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others).
18 18
19 -6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. 19 +6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
20 20
21 -7. Should You wish to submit work that is not Your original creation, You may submit it to GitLab B.V. separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]". 21 +7. Should You wish to submit work that is not Your original creation, You may submit it to GitLab B.V. separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [named here]".
22 22
23 -8. It is your responsibility to notify GitLab B.V. when any change is required to the list of designated employees authorized to submit Contributions on behalf of the Corporation, or to the Corporation's Point of Contact with GitLab B.V..  
24 -  
25 ---------------------------------------- 23 +8. It is your responsibility to notify GitLab B.V. when any change is required to the list of designated employees authorized to submit Contributions on behalf of the Corporation, or to the Corporation's Point of Contact with GitLab B.V..
26 24
27 This text is licensed under the [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/) and the original source is the Google Open Source Programs Office. 25 This text is licensed under the [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/) and the original source is the Google Open Source Programs Office.
doc/legal/individual_contributor_license_agreement.md
@@ -2,26 +2,24 @@ @@ -2,26 +2,24 @@
2 2
3 You accept and agree to the following terms and conditions for Your present and future Contributions submitted to GitLab B.V.. Except for the license granted herein to GitLab B.V. and recipients of software distributed by GitLab B.V., You reserve all right, title, and interest in and to Your Contributions. 3 You accept and agree to the following terms and conditions for Your present and future Contributions submitted to GitLab B.V.. Except for the license granted herein to GitLab B.V. and recipients of software distributed by GitLab B.V., You reserve all right, title, and interest in and to Your Contributions.
4 4
5 -1. Definitions. 5 +1. Definitions.
6 6
7 "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with GitLab B.V.. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity. 7 "You" (or "Your") shall mean the copyright owner or legal entity authorized by the copyright owner that is making this Agreement with GitLab B.V.. For legal entities, the entity making a Contribution and all other entities that control, are controlled by, or are under common control with that entity are considered to be a single Contributor. For the purposes of this definition, "control" means (i) the power, direct or indirect, to cause the direction or management of such entity, whether by contract or otherwise, or (ii) ownership of fifty percent (50%) or more of the outstanding shares, or (iii) beneficial ownership of such entity.
8 8
9 "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to GitLab B.V. for inclusion in, or documentation of, any of the products owned or managed by GitLab B.V. (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to GitLab B.V. or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, GitLab B.V. for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution." 9 "Contribution" shall mean any original work of authorship, including any modifications or additions to an existing work, that is intentionally submitted by You to GitLab B.V. for inclusion in, or documentation of, any of the products owned or managed by GitLab B.V. (the "Work"). For the purposes of this definition, "submitted" means any form of electronic, verbal, or written communication sent to GitLab B.V. or its representatives, including but not limited to communication on electronic mailing lists, source code control systems, and issue tracking systems that are managed by, or on behalf of, GitLab B.V. for the purpose of discussing and improving the Work, but excluding communication that is conspicuously marked or otherwise designated in writing by You as "Not a Contribution."
10 10
11 -2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works. 11 +2. Grant of Copyright License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable copyright license to reproduce, prepare derivative works of, publicly display, publicly perform, sublicense, and distribute Your Contributions and such derivative works.
12 12
13 -3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed. 13 +3. Grant of Patent License. Subject to the terms and conditions of this Agreement, You hereby grant to GitLab B.V. and to recipients of software distributed by GitLab B.V. a perpetual, worldwide, non-exclusive, no-charge, royalty-free, irrevocable (except as stated in this section) patent license to make, have made, use, offer to sell, sell, import, and otherwise transfer the Work, where such license applies only to those patent claims licensable by You that are necessarily infringed by Your Contribution(s) alone or by combination of Your Contribution(s) with the Work to which such Contribution(s) was submitted. If any entity institutes patent litigation against You or any other entity (including a cross-claim or counterclaim in a lawsuit) alleging that your Contribution, or the Work to which you have contributed, constitutes direct or contributory patent infringement, then any patent licenses granted to that entity under this Agreement for that Contribution or Work shall terminate as of the date such litigation is filed.
14 14
15 -4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to GitLab B.V., or that your employer has executed a separate Corporate CLA with GitLab B.V.. 15 +4. You represent that you are legally entitled to grant the above license. If your employer(s) has rights to intellectual property that you create that includes your Contributions, you represent that you have received permission to make Contributions on behalf of that employer, that your employer has waived such rights for your Contributions to GitLab B.V., or that your employer has executed a separate Corporate CLA with GitLab B.V..
16 16
17 -5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions. 17 +5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others). You represent that Your Contribution submissions include complete details of any third-party license or other restriction (including, but not limited to, related patents and trademarks) of which you are personally aware and which are associated with any part of Your Contributions.
18 18
19 -6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE. 19 +6. You are not expected to provide support for Your Contributions, except to the extent You desire to provide support. You may provide support for free, for a fee, or not at all. Unless required by applicable law or agreed to in writing, You provide Your Contributions on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied, including, without limitation, any warranties or conditions of TITLE, NON- INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A PARTICULAR PURPOSE.
20 20
21 -7. Should You wish to submit work that is not Your original creation, You may submit it to GitLab B.V. separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [[]named here]". 21 +7. Should You wish to submit work that is not Your original creation, You may submit it to GitLab B.V. separately from any Contribution, identifying the complete details of its source and of any license or other restriction (including, but not limited to, related patents, trademarks, and license agreements) of which you are personally aware, and conspicuously marking the work as "Submitted on behalf of a third-party: [[]named here]".
22 22
23 -8. You agree to notify GitLab B.V. of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.  
24 -  
25 ---------------------------------------- 23 +8. You agree to notify GitLab B.V. of any facts or circumstances of which you become aware that would make these representations inaccurate in any respect.
26 24
27 This text is licensed under the [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/) and the original source is the Google Open Source Programs Office. 25 This text is licensed under the [Creative Commons Attribution 3.0 License](http://creativecommons.org/licenses/by/3.0/) and the original source is the Google Open Source Programs Office.
doc/markdown/markdown.md
1 # Markdown 1 # Markdown
2 2
3 -----------------------------------------------  
4 -  
5 -Table of Contents  
6 -=================  
7 -  
8 ----------------------------------------------- 3 +## Table of Contents
9 4
10 **[GitLab Flavored Markdown](#gitlab-flavored-markdown-gfm)** 5 **[GitLab Flavored Markdown](#gitlab-flavored-markdown-gfm)**
11 6
@@ -21,7 +16,6 @@ Table of Contents @@ -21,7 +16,6 @@ Table of Contents
21 16
22 [Special GitLab references](#special-gitlab-references) 17 [Special GitLab references](#special-gitlab-references)
23 18
24 -  
25 **[Standard Markdown](#standard-markdown)** 19 **[Standard Markdown](#standard-markdown)**
26 20
27 [Headers](#headers) 21 [Headers](#headers)
@@ -46,29 +40,24 @@ Table of Contents @@ -46,29 +40,24 @@ Table of Contents
46 40
47 **[References](#references)** 41 **[References](#references)**
48 42
49 ----------------------------------------------- 43 +## GitLab Flavored Markdown (GFM)
50 44
51 -GitLab Flavored Markdown (GFM)  
52 -==============================  
53 -For GitLab we developed something we call "GitLab Flavored Markdown" (GFM).  
54 -It extends the standard Markdown in a few significant ways to add some useful functionality. 45 +For GitLab we developed something we call "GitLab Flavored Markdown" (GFM). It extends the standard Markdown in a few significant ways to add some useful functionality.
55 46
56 You can use GFM in 47 You can use GFM in
57 48
58 -* commit messages  
59 -* comments  
60 -* wall posts  
61 -* issues  
62 -* merge requests  
63 -* milestones  
64 -* wiki pages 49 +- commit messages
  50 +- comments
  51 +- wall posts
  52 +- issues
  53 +- merge requests
  54 +- milestones
  55 +- wiki pages
65 56
66 -You can also use other rich text files in GitLab.  
67 -You might have to install a depency to do so.  
68 -Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information. 57 +You can also use other rich text files in GitLab. You might have to install a depency to do so. Please see the [github-markup gem readme](https://github.com/gitlabhq/markup#markups) for more information.
  58 +
  59 +## Newlines
69 60
70 -Newlines  
71 ---------  
72 GFM honors the markdown specification in how [paragraphs and line breaks are handled](http://daringfireball.net/projects/markdown/syntax#p). 61 GFM honors the markdown specification in how [paragraphs and line breaks are handled](http://daringfireball.net/projects/markdown/syntax#p).
73 62
74 A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines.: 63 A paragraph is simply one or more consecutive lines of text, separated by one or more blank lines.:
@@ -83,8 +72,8 @@ Violets are blue @@ -83,8 +72,8 @@ Violets are blue
83 72
84 Sugar is sweet 73 Sugar is sweet
85 74
86 -Multiple underscores in words  
87 ------------------------------ 75 +## Multiple underscores in words
  76 +
88 It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words. 77 It is not reasonable to italicize just _part_ of a word, especially when you're dealing with code and names that often appear with multiple underscores. Therefore, GFM ignores multiple underscores in words.
89 78
90 perform_complicated_task 79 perform_complicated_task
@@ -93,10 +82,9 @@ It is not reasonable to italicize just _part_ of a word, especially when you&#39;re @@ -93,10 +82,9 @@ It is not reasonable to italicize just _part_ of a word, especially when you&#39;re
93 perform_complicated_task 82 perform_complicated_task
94 do_this_and_do_that_and_another_thing 83 do_this_and_do_that_and_another_thing
95 84
96 -URL autolinking  
97 ----------------  
98 -GFM will autolink standard URLs you copy and paste into your text.  
99 -So if you want to link to a URL (instead of a textural link), you can simply put the URL in verbatim and it will be turned into a link to that URL. 85 +## URL autolinking
  86 +
  87 +GFM will autolink standard URLs you copy and paste into your text. So if you want to link to a URL (instead of a textural link), you can simply put the URL in verbatim and it will be turned into a link to that URL.
100 88
101 http://www.google.com 89 http://www.google.com
102 90
@@ -164,8 +152,7 @@ s = &quot;There is no highlighting for this.&quot; @@ -164,8 +152,7 @@ s = &quot;There is no highlighting for this.&quot;
164 But let's throw in a <b>tag</b>. 152 But let's throw in a <b>tag</b>.
165 ``` 153 ```
166 154
167 -Emoji  
168 ------ 155 +## Emoji
169 156
170 Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you: 157 Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you:
171 158
@@ -187,26 +174,25 @@ If you are :new: to this, don&#39;t be :fearful:. You can easily join the emoji :cir @@ -187,26 +174,25 @@ If you are :new: to this, don&#39;t be :fearful:. You can easily join the emoji :cir
187 174
188 Consult the [Emoji Cheat Sheet](http://www.emoji-cheat-sheet.com/) for a list of all supported emoji codes. :thumbsup: 175 Consult the [Emoji Cheat Sheet](http://www.emoji-cheat-sheet.com/) for a list of all supported emoji codes. :thumbsup:
189 176
190 -Special GitLab References  
191 ------ 177 +## Special GitLab References
192 178
193 GFM recognized special references. 179 GFM recognized special references.
  180 +
194 You can easily reference e.g. a team member, an issue, or a commit within a project. 181 You can easily reference e.g. a team member, an issue, or a commit within a project.
  182 +
195 GFM will turn that reference into a link so you can navigate between them easily. 183 GFM will turn that reference into a link so you can navigate between them easily.
196 184
197 GFM will recognize the following: 185 GFM will recognize the following:
198 186
199 -* @foo : for team members  
200 -* #123 : for issues  
201 -* !123 : for merge requests  
202 -* $123 : for snippets  
203 -* 1234567 : for commits  
204 -* \[file\](path/to/file) : for file references 187 +- @foo : for team members
  188 +- #123 : for issues
  189 +- !123 : for merge requests
  190 +- $123 : for snippets
  191 +- 1234567 : for commits
  192 +- \[file\](path/to/file) : for file references
205 193
206 -----------------------------------  
207 # Standard Markdown 194 # Standard Markdown
208 195
209 -----------------------------------  
210 ## Headers 196 ## Headers
211 197
212 ```no-highlight 198 ```no-highlight
@@ -249,12 +235,12 @@ On hover a link to those IDs becomes visible to make it easier to copy the link @@ -249,12 +235,12 @@ On hover a link to those IDs becomes visible to make it easier to copy the link
249 235
250 The IDs are generated from the content of the header according to the following rules: 236 The IDs are generated from the content of the header according to the following rules:
251 237
252 -1) remove the heading hashes `#` and process the rest of the line as it would be processed if it were not a header  
253 -2) from the result, remove all HTML tags, but keep their inner content  
254 -3) convert all characters to lowercase  
255 -4) convert all characters except `[a-z0-9_-]` into hyphens `-`  
256 -5) transform multiple adjacent hyphens into a single hyphen  
257 -6) remove trailing and heading hyphens 238 +1. remove the heading hashes `#` and process the rest of the line as it would be processed if it were not a header
  239 +2. from the result, remove all HTML tags, but keep their inner content
  240 +3. convert all characters to lowercase
  241 +4. convert all characters except `[a-z0-9_-]` into hyphens `-`
  242 +5. transform multiple adjacent hyphens into a single hyphen
  243 +6. remove trailing and heading hyphens
258 244
259 For example: 245 For example:
260 246
@@ -377,8 +363,7 @@ Some text to show that the reference links can follow later. @@ -377,8 +363,7 @@ Some text to show that the reference links can follow later.
377 363
378 **Note** 364 **Note**
379 365
380 -Relative links do not allow referencing project files in a wiki page or wiki page in a project file.  
381 -The reason for this is that, in GitLab, wiki is always a separate git repository. For example: 366 +Relative links do not allow referencing project files in a wiki page or wiki page in a project file. The reason for this is that, in GitLab, wiki is always a separate git repository. For example:
382 367
383 `[I'm a reference-style link][style]` 368 `[I'm a reference-style link][style]`
384 369
@@ -399,9 +384,11 @@ will point the link to `wikis/style` when the link is inside of a wiki markdown @@ -399,9 +384,11 @@ will point the link to `wikis/style` when the link is inside of a wiki markdown
399 Here's our logo: 384 Here's our logo:
400 385
401 Inline-style: 386 Inline-style:
  387 +
402 ![alt text](/assets/logo-white.png) 388 ![alt text](/assets/logo-white.png)
403 389
404 Reference-style: 390 Reference-style:
  391 +
405 ![alt text][logo] 392 ![alt text][logo]
406 393
407 [logo]: /assets/logo-white.png 394 [logo]: /assets/logo-white.png
@@ -518,10 +505,8 @@ Code above produces next output: @@ -518,10 +505,8 @@ Code above produces next output:
518 | cell 1 | cell 2 | 505 | cell 1 | cell 2 |
519 | cell 3 | cell 4 | 506 | cell 3 | cell 4 |
520 507
521 -------------  
522 -  
523 ## References 508 ## References
524 509
525 -* This document leveraged heavily from the [Markdown-Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).  
526 -* The [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown.  
527 -* [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown. 510 +- This document leveraged heavily from the [Markdown-Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
  511 +- The [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown.
  512 +- [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown.
doc/permissions/permissions.md
1 # Permissions 1 # Permissions
2 2
3 Users have different abilities depending on the access level they have in a particular group or project. 3 Users have different abilities depending on the access level they have in a particular group or project.
  4 +
4 If a user is both in a project group and in the project itself, the highest permission level is used. 5 If a user is both in a project group and in the project itself, the highest permission level is used.
  6 +
5 If a user is a GitLab administrator they receive all permissions. 7 If a user is a GitLab administrator they receive all permissions.
6 8
7 ----  
8 -  
9 -#### Project:  
10 -  
11 -  
12 -| Action| Guest | Reporter | Developer | Master | Owner|  
13 -|-------|-------|----------|-----------|--------|------|  
14 -|Create new issue|✓|✓|✓|✓|✓|  
15 -|Leave comments|✓|✓|✓|✓|✓|  
16 -|Write on project wall|✓|✓|✓|✓|✓|  
17 -|Pull project code| |✓|✓|✓|✓|  
18 -|Download project| |✓|✓|✓|✓|  
19 -|Create code snippets| |✓|✓|✓|✓|  
20 -|Create new merge request| ||✓|✓|✓|  
21 -|Create new branches| ||✓|✓|✓|  
22 -|Push to non-protected branches| ||✓|✓|✓|  
23 -|Remove non-protected branches| ||✓|✓|✓|  
24 -|Add tags| ||✓|✓|✓|  
25 -|Write a wiki| ||✓|✓|✓|  
26 -|Manage issue tracker| ||✓|✓|✓|  
27 -|Add new team members| |||✓|✓|  
28 -|Push to protected branches| |||✓|✓|  
29 -|Enable/Disable branch protection| |||✓|✓|  
30 -|Rewrite/remove git tags| |||✓|✓|  
31 -|Edit project| |||✓|✓|  
32 -|Add Deploy Keys to project| |||✓|✓|  
33 -|Configure Project Hooks| |||✓|✓|  
34 -|Switch visibility level| ||||✓|  
35 -|Transfer project to another namespace| ||||✓|  
36 -|Remove project| ||||✓|  
37 -  
38 -#### Group  
39 -  
40 -|Action|Guest|Reporter|Developer|Master|Owner|  
41 -|------|-----|--------|---------|------|-----|  
42 -|Browse group|✓|✓|✓|✓|✓|  
43 -|Edit group|||||✓|  
44 -|Create project in group||||✓|✓|  
45 -|Manage group members|||||✓|  
46 -|Remove group|||||✓| 9 +## Project
  10 +
  11 +
  12 +| Action | Guest | Reporter | Developer | Master | Owner |
  13 +|---------------------------------------|---------|------------|-------------|----------|--------|
  14 +| Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ |
  15 +| Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ |
  16 +| Write on project wall | ✓ | ✓ | ✓ | ✓ | ✓ |
  17 +| Pull project code | | ✓ | ✓ | ✓ | ✓ |
  18 +| Download project | | ✓ | ✓ | ✓ | ✓ |
  19 +| Create code snippets | | ✓ | ✓ | ✓ | ✓ |
  20 +| Create new merge request | | | ✓ | ✓ | ✓ |
  21 +| Create new branches | | | ✓ | ✓ | ✓ |
  22 +| Push to non-protected branches | | | ✓ | ✓ | ✓ |
  23 +| Remove non-protected branches | | | ✓ | ✓ | ✓ |
  24 +| Add tags | | | ✓ | ✓ | ✓ |
  25 +| Write a wiki | | | ✓ | ✓ | ✓ |
  26 +| Manage issue tracker | | | ✓ | ✓ | ✓ |
  27 +| Add new team members | | | | ✓ | ✓ |
  28 +| Push to protected branches | | | | ✓ | ✓ |
  29 +| Enable/Disable branch protection | | | | ✓ | ✓ |
  30 +| Rewrite/remove git tags | | | | ✓ | ✓ |
  31 +| Edit project | | | | ✓ | ✓ |
  32 +| Add Deploy Keys to project | | | | ✓ | ✓ |
  33 +| Configure Project Hooks | | | | ✓ | ✓ |
  34 +| Switch visibility level | | | | | ✓ |
  35 +| Transfer project to another namespace | | | | | ✓ |
  36 +| Remove project | | | | | ✓ |
  37 +
  38 +## Group
  39 +
  40 +| Action | Guest | Reporter | Developer | Master | Owner |
  41 +|-------------------------|-------|----------|-----------|--------|-------|
  42 +| Browse group | ✓ | ✓ | ✓ | ✓ | ✓ |
  43 +| Edit group | | | | | ✓ |
  44 +| Create project in group | | | | ✓ | ✓ |
  45 +| Manage group members | | | | | ✓ |
  46 +| Remove group | | | | | ✓ |
47 47
48 Any user can remove himself from a group, unless he is the last Owner of the group. 48 Any user can remove himself from a group, unless he is the last Owner of the group.
doc/public_access/public_access.md
1 # Public access 1 # Public access
2 2
3 Gitlab allows you to open selected projects to be accessed **publicly** or **internally**. 3 Gitlab allows you to open selected projects to be accessed **publicly** or **internally**.
  4 +
4 Projects with either of these visibility levels will be listen in the [public access directory](/public). 5 Projects with either of these visibility levels will be listen in the [public access directory](/public).
  6 +
5 Internal projects will only be available to authenticated users. 7 Internal projects will only be available to authenticated users.
6 8
7 -#### Public projects 9 +## Public projects
  10 +
8 Public projects can be cloned **without any** authentication. 11 Public projects can be cloned **without any** authentication.
  12 +
9 It will also be listed on the [public access directory](/public). 13 It will also be listed on the [public access directory](/public).
  14 +
10 **Any logged in user** will have [Guest](/help/permissions) permissions on the repository. 15 **Any logged in user** will have [Guest](/help/permissions) permissions on the repository.
11 16
12 -#### Internal projects 17 +## Internal projects
  18 +
13 Internal projects can be cloned by any logged in user. 19 Internal projects can be cloned by any logged in user.
  20 +
14 It will also be listed on the [public access directory](/public) for logged in users. 21 It will also be listed on the [public access directory](/public) for logged in users.
  22 +
15 Any logged in user will have [Guest](/help/permissions) permissions on the repository. 23 Any logged in user will have [Guest](/help/permissions) permissions on the repository.
16 24
17 -#### How to change project visibility 25 +## How to change project visibility
  26 +
18 1. Go to your project dashboard 27 1. Go to your project dashboard
19 -2. Click on the "Edit" tab  
20 -3. Change "Visibility Level" 28 +1. Click on the "Edit" tab
  29 +1. Change "Visibility Level"
  30 +
  31 +## Visibility of users
21 32
22 -#### Visibility of users  
23 The public page of users, located at `/u/username` is visible if either: 33 The public page of users, located at `/u/username` is visible if either:
24 34
25 -* You are logged in.  
26 -* You are logged out, and the target user is authorized to (is Guest, Reporter, etc.) at least one public project. 35 +- You are logged in.
  36 +- You are logged out, and the target user is authorized to (is Guest, Reporter, etc.) at least one public project.
27 37
28 Otherwise, you will be redirected to the sign in page. 38 Otherwise, you will be redirected to the sign in page.
29 39
30 When visiting the public page of an user, you will only see listed projects which you can view yourself. 40 When visiting the public page of an user, you will only see listed projects which you can view yourself.
31 41
32 -#### Restricting the use of public or internal projects  
33 -In [gitlab.yml](https://gitlab.com/gitlab-org/gitlab-ce/blob/dbd88d453b8e6c78a423fa7e692004b1db6ea069/config/gitlab.yml.example#L64) you can disable public projects or public and internal projects for the entire GitLab installation to prevent people making code public by accident. 42 +## Restricting the use of public or internal projects
34 43
  44 +In [gitlab.yml](https://gitlab.com/gitlab-org/gitlab-ce/blob/dbd88d453b8e6c78a423fa7e692004b1db6ea069/config/gitlab.yml.example#L64) you can disable public projects or public and internal projects for the entire GitLab installation to prevent people making code public by accident.
doc/raketasks/README.md
1 -+ [Backup restore](backup_restore.md)  
2 -+ [Cleanup](cleanup.md)  
3 -+ [Maintenance](maintenance.md) and self-checks  
4 -+ [User management](user_management.md)  
5 -+ [Web hooks](web_hooks.md)  
6 -+ [Import](import.md) of git repositories in bulk 1 +- [Backup restore](backup_restore.md)
  2 +- [Cleanup](cleanup.md)
  3 +- [Maintenance](maintenance.md) and self-checks
  4 +- [User management](user_management.md)
  5 +- [Web hooks](web_hooks.md)
  6 +- [Import](import.md) of git repositories in bulk
doc/raketasks/backup_restore.md
1 # Backup restore 1 # Backup restore
2 2
3 -### Create a backup of the GitLab system 3 +## Create a backup of the GitLab system
4 4
5 Creates a backup archive of the database and all repositories. This archive will be saved in backup_path (see `config/gitlab.yml`). 5 Creates a backup archive of the database and all repositories. This archive will be saved in backup_path (see `config/gitlab.yml`).
  6 +
6 The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup. 7 The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup.
7 8
8 ``` 9 ```
@@ -38,7 +39,7 @@ Deleting tmp directories...[DONE] @@ -38,7 +39,7 @@ Deleting tmp directories...[DONE]
38 Deleting old backups... [SKIPPING] 39 Deleting old backups... [SKIPPING]
39 ``` 40 ```
40 41
41 -### Restore a previously created backup 42 +## Restore a previously created backup
42 43
43 ``` 44 ```
44 bundle exec rake gitlab:backup:restore RAILS_ENV=production 45 bundle exec rake gitlab:backup:restore RAILS_ENV=production
@@ -81,7 +82,7 @@ Restoring repositories: @@ -81,7 +82,7 @@ Restoring repositories:
81 Deleting tmp directories...[DONE] 82 Deleting tmp directories...[DONE]
82 ``` 83 ```
83 84
84 -### Configure cron to make daily backups 85 +## Configure cron to make daily backups
85 86
86 ``` 87 ```
87 cd /home/git/gitlab 88 cd /home/git/gitlab
doc/raketasks/cleanup.md
1 # Cleanup 1 # Cleanup
2 2
3 -### Remove garbage from filesystem. Important! Data loss! 3 +## Remove garbage from filesystem. Important! Data loss!
4 4
5 Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database. 5 Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database.
6 6
@@ -13,4 +13,3 @@ Remove repositories (global only for now) from `/home/git/repositories` if they @@ -13,4 +13,3 @@ Remove repositories (global only for now) from `/home/git/repositories` if they
13 ``` 13 ```
14 bundle exec rake gitlab:cleanup:repos RAILS_ENV=production 14 bundle exec rake gitlab:cleanup:repos RAILS_ENV=production
15 ``` 15 ```
16 -  
doc/raketasks/features.md 0 → 100644
@@ -0,0 +1,38 @@ @@ -0,0 +1,38 @@
  1 +# Features
  2 +
  3 +## Enable usernames and namespaces for user projects
  4 +
  5 +This command will enable the namespaces feature introduced in v4.0. It will move every project in its namespace folder.
  6 +
  7 +Note:
  8 +
  9 +- Because the **repository location will change**, you will need to **update all your git url's** to point to the new location.
  10 +- Username can be changed at [Profile / Account](/profile/account)
  11 +
  12 +**Example:**
  13 +
  14 +Old path: `git@example.org:myrepo.git`
  15 +
  16 +New path: `git@example.org:username/myrepo.git` or `git@example.org:groupname/myrepo.git`
  17 +
  18 +```
  19 +bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
  20 +```
  21 +
  22 +## Rebuild project satellites
  23 +
  24 +This command will build missing satellites for projects. After this you will be able to **merge a merge request** via GitLab and use the **online editor**.
  25 +
  26 +```
  27 +bundle exec rake gitlab:satellites:create RAILS_ENV=production
  28 +```
  29 +
  30 +Example output:
  31 +
  32 +```
  33 +Creating satellite for abcd.git
  34 +[git clone output]
  35 +Creating satellite for abcd2.git
  36 +[git clone output]
  37 +done
  38 +```
doc/raketasks/maintenance.md
1 # Maintenance 1 # Maintenance
2 2
3 -### Gather information about GitLab and the system it runs on 3 +## Gather information about GitLab and the system it runs on
4 4
5 -This command gathers information about your GitLab installation and the System  
6 -it runs on. These may be useful when asking for help or reporting issues. 5 +This command gathers information about your GitLab installation and the System it runs on. These may be useful when asking for help or reporting issues.
7 6
8 ``` 7 ```
9 bundle exec rake gitlab:env:info RAILS_ENV=production 8 bundle exec rake gitlab:env:info RAILS_ENV=production
@@ -39,15 +38,14 @@ Hooks: /home/git/gitlab-shell/hooks/ @@ -39,15 +38,14 @@ Hooks: /home/git/gitlab-shell/hooks/
39 Git: /usr/bin/git 38 Git: /usr/bin/git
40 ``` 39 ```
41 40
42 -  
43 -### Check GitLab configuration 41 +## Check GitLab configuration
44 42
45 Runs the following rake tasks: 43 Runs the following rake tasks:
46 44
47 -* gitlab:env:check  
48 -* gitlab:gitlab_shell:check  
49 -* gitlab:sidekiq:check  
50 -* gitlab:app:check 45 +- `gitlab:env:check`
  46 +- `gitlab:gitlab_shell:check`
  47 +- `gitlab:sidekiq:check`
  48 +- `gitlab:app:check`
51 49
52 It will check that each component was setup according to the installation guide and suggest fixes for issues found. 50 It will check that each component was setup according to the installation guide and suggest fixes for issues found.
53 51
@@ -103,10 +101,10 @@ Redis version &gt;= 2.0.0? ... yes @@ -103,10 +101,10 @@ Redis version &gt;= 2.0.0? ... yes
103 Checking GitLab ... Finished 101 Checking GitLab ... Finished
104 ``` 102 ```
105 103
106 -  
107 -### (Re-)Create satellite repos 104 +## (Re-)Create satellite repos
108 105
109 This will create satellite repos for all your projects. 106 This will create satellite repos for all your projects.
  107 +
110 If necessary, remove the `tmp/repo_satellites` directory and rerun the command below. 108 If necessary, remove the `tmp/repo_satellites` directory and rerun the command below.
111 109
112 ``` 110 ```
doc/raketasks/user_management.md
1 # User management 1 # User management
2 2
3 -### Add user as a developer to all projects 3 +## Add user as a developer to all projects
4 4
5 ```bash 5 ```bash
6 bundle exec rake gitlab:import:user_to_projects[username@domain.tld] 6 bundle exec rake gitlab:import:user_to_projects[username@domain.tld]
7 ``` 7 ```
8 8
9 -  
10 -### Add all users to all projects 9 +## Add all users to all projects
11 10
12 Notes: 11 Notes:
13 12
14 -* admin users are added as masters 13 +- admin users are added as masters
15 14
16 ```bash 15 ```bash
17 bundle exec rake gitlab:import:all_users_to_all_projects 16 bundle exec rake gitlab:import:all_users_to_all_projects
18 ``` 17 ```
19 18
20 -### Add user as a developer to all groups 19 +## Add user as a developer to all groups
21 20
22 -``` 21 +```bash
23 bundle exec rake gitlab:import:user_to_groups[username@domain.tld] 22 bundle exec rake gitlab:import:user_to_groups[username@domain.tld]
24 ``` 23 ```
25 24
26 -### Add all users to all groups 25 +## Add all users to all groups
27 26
28 Notes: 27 Notes:
29 28
30 -* admin users are added as owners so they can add additional users to the group 29 +- admin users are added as owners so they can add additional users to the group
31 30
32 -``` 31 +```bash
33 bundle exec rake gitlab:import:all_users_to_all_groups 32 bundle exec rake gitlab:import:all_users_to_all_groups
34 ``` 33 ```
doc/raketasks/web_hooks.md
1 # Web hooks 1 # Web hooks
2 2
3 -### Add a web hook for **ALL** projects: 3 +## Add a web hook for **ALL** projects:
4 4
5 RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" 5 RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook"
6 6
7 -  
8 -### Add a web hook for projects in a given **NAMESPACE**: 7 +## Add a web hook for projects in a given **NAMESPACE**:
9 8
10 RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme 9 RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
11 10
12 -  
13 -### Remove a web hook from **ALL** projects using: 11 +## Remove a web hook from **ALL** projects using:
14 12
15 RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" 13 RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook"
16 14
17 -  
18 -### Remove a web hook from projects in a given **NAMESPACE**: 15 +## Remove a web hook from projects in a given **NAMESPACE**:
19 16
20 RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme 17 RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
21 18
22 -  
23 -### List **ALL** web hooks: 19 +## List **ALL** web hooks:
24 20
25 RAILS_ENV=production bundle exec rake gitlab:web_hook:list 21 RAILS_ENV=production bundle exec rake gitlab:web_hook:list
26 22
27 -  
28 -### List the web hooks from projects in a given **NAMESPACE**: 23 +## List the web hooks from projects in a given **NAMESPACE**:
29 24
30 RAILS_ENV=production bundle exec rake gitlab:web_hook:list NAMESPACE=/ 25 RAILS_ENV=production bundle exec rake gitlab:web_hook:list NAMESPACE=/
31 26
32 > Note: `/` is the global namespace. 27 > Note: `/` is the global namespace.
33 -  
doc/release/README.md
1 GitLab has the following updates: 1 GitLab has the following updates:
2 2
3 -+ [Monthly release](monthly.md), every month on the 22nd.  
4 -+ [Patch release](patch.md), if there are serious regressions.  
5 -+ [Security](security.md), for security problems.  
6 -+ [Master](master.md), update process for the master branch. 3 +- [Monthly release](monthly.md), every month on the 22nd.
  4 +- [Patch release](patch.md), if there are serious regressions.
  5 +- [Security](security.md), for security problems.
  6 +- [Master](master.md), update process for the master branch.
doc/release/monthly.md
@@ -25,16 +25,18 @@ Consider naming the issue &quot;Release x.x.x.rc1&quot; to make it easier for later search @@ -25,16 +25,18 @@ Consider naming the issue &quot;Release x.x.x.rc1&quot; to make it easier for later search
25 ### **2. Update the installation guide** 25 ### **2. Update the installation guide**
26 26
27 1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay) 27 1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay)
28 -2. Check the [GitLab Shell version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L782)  
29 -3. Check the [Git version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L794)  
30 -4. There might be other changes. Ask around. 28 +1. Check the [GitLab Shell version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L782)
  29 +1. Check the [Git version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L794)
  30 +1. There might be other changes. Ask around.
31 31
32 ### **3. Create an update guide** 32 ### **3. Create an update guide**
33 33
34 It's best to copy paste the previous guide and make changes where necessary. The typical steps are listed below with any points you should specifically look at. 34 It's best to copy paste the previous guide and make changes where necessary. The typical steps are listed below with any points you should specifically look at.
35 35
36 #### 0. Any major changes? 36 #### 0. Any major changes?
37 -List any major changes here, so the user is aware of them before starting to upgrade. For instance: 37 +
  38 +List any major changes here, so the user is aware of them before starting to upgrade. For instance:
  39 +
38 - Database updates 40 - Database updates
39 - Web server changes 41 - Web server changes
40 - File structure changes 42 - File structure changes
@@ -59,42 +61,43 @@ List any major changes here, so the user is aware of them before starting to upg @@ -59,42 +61,43 @@ List any major changes here, so the user is aware of them before starting to upg
59 61
60 Check if any of these changed since last release: 62 Check if any of these changed since last release:
61 63
62 -* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/lib/support/nginx/gitlab  
63 -* https://gitlab.com/gitlab-org/gitlab-shell/commits/master/config.yml.example  
64 -* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/gitlab.yml.example  
65 -* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/unicorn.rb.example  
66 -* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.mysql  
67 -* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.postgresql 64 +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/lib/support/nginx/gitlab>
  65 +- <https://gitlab.com/gitlab-org/gitlab-shell/commits/master/config.yml.example>
  66 +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/gitlab.yml.example>
  67 +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/unicorn.rb.example>
  68 +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.mysql>
  69 +- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.postgresql>
68 70
69 #### 8. Need to update init script? 71 #### 8. Need to update init script?
70 72
71 -Check if the init.d/gitlab script changed since last release: https://gitlab.com/gitlab-org/gitlab-ce/commits/master/lib/support/init.d/gitlab 73 +Check if the `init.d/gitlab` script changed since last release: <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/lib/support/init.d/gitlab>
72 74
73 #### 9. Start application 75 #### 9. Start application
74 76
75 #### 10. Check application status 77 #### 10. Check application status
76 78
77 -### **4. Code quality indicatiors** 79 +### **4. Code quality indicators**
  80 +
78 Make sure the code quality indicators are green / good. 81 Make sure the code quality indicators are green / good.
79 82
80 -* [![build status](http://ci.gitlab.org/projects/1/status.png?ref=master)](http://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch) 83 +- [![build status](http://ci.gitlab.org/projects/1/status.png?ref=master)](http://ci.gitlab.org/projects/1?ref=master) on ci.gitlab.org (master branch)
81 84
82 -* [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://travis-ci.org/gitlabhq/gitlabhq) on travis-ci.org (master branch) 85 +- [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://travis-ci.org/gitlabhq/gitlabhq) on travis-ci.org (master branch)
83 86
84 -* [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq) 87 +- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
85 88
86 -* [![Dependency Status](https://gemnasium.com/gitlabhq/gitlabhq.png)](https://gemnasium.com/gitlabhq/gitlabhq) this button can be yellow (small updates are available) but must not be red (a security fix or an important update is available) 89 +- [![Dependency Status](https://gemnasium.com/gitlabhq/gitlabhq.png)](https://gemnasium.com/gitlabhq/gitlabhq) this button can be yellow (small updates are available) but must not be red (a security fix or an important update is available)
87 90
88 -* [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq) 91 +- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
89 92
90 ### **5. Set VERSION** 93 ### **5. Set VERSION**
91 94
92 -Change version in VERSION to x.x.0.rc1  
93 - 95 +Change version in VERSION to `x.x.0.rc1`.
94 96
95 ### **6. Tag** 97 ### **6. Tag**
96 98
97 -Create an annotated tag that points to the version change commit. 99 +Create an annotated tag that points to the version change commit:
  100 +
98 ``` 101 ```
99 git tag -a vx.x.0.rc1 -m 'Version x.x.0.rc1' 102 git tag -a vx.x.0.rc1 -m 'Version x.x.0.rc1'
100 ``` 103 ```
@@ -105,6 +108,7 @@ Tweet about the RC release: @@ -105,6 +108,7 @@ Tweet about the RC release:
105 108
106 > GitLab x.x.x.rc1 is out. This is a release candidate intended for testing only. Please let us know if you find regressions. 109 > GitLab x.x.x.rc1 is out. This is a release candidate intended for testing only. Please let us know if you find regressions.
107 110
  111 +n
108 ### **8. Update GitLab.com** 112 ### **8. Update GitLab.com**
109 113
110 Merge the RC1 code into GitLab.com. Once the build is green, deploy in the morning. 114 Merge the RC1 code into GitLab.com. Once the build is green, deploy in the morning.
@@ -115,28 +119,27 @@ It is important to do this as soon as possible, so we can catch any errors befor @@ -115,28 +119,27 @@ It is important to do this as soon as possible, so we can catch any errors befor
115 119
116 ### **1. Prepare the blog post** 120 ### **1. Prepare the blog post**
117 121
118 -* Check the changelog of CE and EE for important changes. Based on [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) fill in the important information.  
119 -* Create a WIP MR for the blog post and cc the team so everyone can give feedback.  
120 -* Ask Dmitriy to add screenshots to the WIP MR.  
121 -* Decide with team who will be the MVP user.  
122 -* Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible. 122 +- Check the changelog of CE and EE for important changes. Based on [release blog template](https://gitlab.com/gitlab-com/www-gitlab-com/blob/master/doc/release_blog_template.md) fill in the important information.
  123 +- Create a WIP MR for the blog post and cc the team so everyone can give feedback.
  124 +- Ask Dmitriy to add screenshots to the WIP MR.
  125 +- Decide with team who will be the MVP user.
  126 +- Add a note if there are security fixes: This release fixes an important security issue and we advise everyone to upgrade as soon as possible.
123 127
124 ### **2. Q&A** 128 ### **2. Q&A**
125 129
126 -Create issue on dev.gitlab.org gitlab repository, named "GitLab X.X release" in order to keep track of the progress. 130 +Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X release" in order to keep track of the progress.
127 131
128 Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md). 132 Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md).
129 133
130 **NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue. 134 **NOTE** Upgrader can only be tested when tags are pushed to all repositories. Do not forget to confirm it is working before releasing. Note that in the issue.
131 135
132 -  
133 ### **3. Fix anything coming out of the QA** 136 ### **3. Fix anything coming out of the QA**
134 137
135 Create an issue with description of a problem, if it is quick fix fix yourself otherwise contact the team for advice. 138 Create an issue with description of a problem, if it is quick fix fix yourself otherwise contact the team for advice.
136 139
137 # **22nd - Release CE and EE** 140 # **22nd - Release CE and EE**
138 141
139 -For GitLab EE, append -ee to the branches and tags. 142 +For GitLab EE, append `-ee` to the branches and tags.
140 143
141 `x-x-stable-ee` 144 `x-x-stable-ee`
142 145
@@ -152,25 +155,24 @@ git push &lt;remote&gt; x-x-stable @@ -152,25 +155,24 @@ git push &lt;remote&gt; x-x-stable
152 ``` 155 ```
153 156
154 ### **2. Build the Omnibus packages** 157 ### **2. Build the Omnibus packages**
  158 +
155 [Follow this guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md) 159 [Follow this guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md)
156 160
157 ### **3. Set VERSION to x.x.x and push** 161 ### **3. Set VERSION to x.x.x and push**
158 162
159 -Change the VERSION file in `master` branch of the CE repository and commit.  
160 -Cherry-pick into the `x-x-stable` branch of CE. 163 +Change the VERSION file in `master` branch of the CE repository and commit. Cherry-pick into the `x-x-stable` branch of CE.
161 164
162 -Change the VERSION file in `master branch of the EE repository and commit.  
163 -Cherry-pick into the `x-x-stable-ee` branch of EE. 165 +Change the VERSION file in `master` branch of the EE repository and commit. Cherry-pick into the `x-x-stable-ee` branch of EE.
164 166
165 ### **4. Create annotated tag vx.x.x** 167 ### **4. Create annotated tag vx.x.x**
166 168
167 -In `x-x-stable` branch check for the sha1 of the commit with VERSION file changed. Tag that commit, 169 +In `x-x-stable` branch check for the SHA-1 of the commit with VERSION file changed. Tag that commit,
168 170
169 ``` 171 ```
170 git tag -a vx.x.0 -m 'Version x.x.0' xxxxx 172 git tag -a vx.x.0 -m 'Version x.x.0' xxxxx
171 ``` 173 ```
172 174
173 -where `xxxxx` is sha1. 175 +where `xxxxx` is SHA-1.
174 176
175 ### **5. Push the tag** 177 ### **5. Push the tag**
176 178
@@ -200,7 +202,7 @@ Proposed tweet for EE &quot;GitLab X.X.X EE is released! It brings *** &lt;link-to-blogp @@ -200,7 +202,7 @@ Proposed tweet for EE &quot;GitLab X.X.X EE is released! It brings *** &lt;link-to-blogp
200 202
201 ### **9. Send out newsletter** 203 ### **9. Send out newsletter**
202 204
203 -In mailchimp replicate the former release newsletters to customers / newsletter subscribers (these are two separate things) and modify them accordingly. 205 +In MailChimp replicate the former release newsletters to customers / newsletter subscribers (these are two separate things) and modify them accordingly.
204 206
205 Include a link to the blog post and keep it short. 207 Include a link to the blog post and keep it short.
206 208
doc/release/patch.md
@@ -4,12 +4,13 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab @@ -4,12 +4,13 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab
4 4
5 ## When to do a patch release 5 ## When to do a patch release
6 6
7 -Do a patch release when there is a critical regression that needs to be adresses before the next monthly release. 7 +Do a patch release when there is a critical regression that needs to be addresses before the next monthly release.
  8 +
8 Otherwise include it in the monthly release and note there was a regression fix in the release announcement. 9 Otherwise include it in the monthly release and note there was a regression fix in the release announcement.
9 10
10 ## Release Procedure 11 ## Release Procedure
11 12
12 -1. Verify that the issue can be repoduced 13 +1. Verify that the issue can be reproduced
13 1. Note in the 'GitLab X.X regressions' that you will create a patch 14 1. Note in the 'GitLab X.X regressions' that you will create a patch
14 1. Create an issue on private GitLab development server 15 1. Create an issue on private GitLab development server
15 1. Name the issue "Release X.X.X CE and X.X.X EE", this will make searching easier 16 1. Name the issue "Release X.X.X CE and X.X.X EE", this will make searching easier
@@ -25,5 +26,5 @@ Otherwise include it in the monthly release and note there was a regression fix @@ -25,5 +26,5 @@ Otherwise include it in the monthly release and note there was a regression fix
25 1. Apply the patch to GitLab Cloud and the private GitLab development server 26 1. Apply the patch to GitLab Cloud and the private GitLab development server
26 1. Build new packages with the latest version 27 1. Build new packages with the latest version
27 1. Cherry-pick the changelog update back into master 28 1. Cherry-pick the changelog update back into master
28 -1. Send tweets about the release from @gitlabhq, tweet should include the most important feature that the release is addressing as well as the link to the changelog 29 +1. Send tweets about the release from `@gitlabhq`, tweet should include the most important feature that the release is addressing as well as the link to the changelog
29 1. Note in the 'GitLab X.X regressions' issue that the patch was published 30 1. Note in the 'GitLab X.X regressions' issue that the patch was published
doc/release/security.md
@@ -4,46 +4,48 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab @@ -4,46 +4,48 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab
4 4
5 ## When to do a security release 5 ## When to do a security release
6 6
7 -Do a security release when there is a critical issue that needs to be adresses before the next monthly release. Otherwise include it in the monthly release and note there was a security fix in the release announcement. 7 +Do a security release when there is a critical issue that needs to be addresses before the next monthly release. Otherwise include it in the monthly release and note there was a security fix in the release announcement.
8 8
9 ## Security vulnerability disclosure 9 ## Security vulnerability disclosure
10 10
11 -Please report suspected security vulnerabilities in private to support@gitlab.com, also see the [disclosure section on the GitLab.com website](http://www.gitlab.com/disclosure/). Please do NOT create publicly viewable issues for suspected security vulnerabilities. 11 +Please report suspected security vulnerabilities in private to <support@gitlab.com>, also see the [disclosure section on the GitLab.com website](http://www.gitlab.com/disclosure/). Please do NOT create publicly viewable issues for suspected security vulnerabilities.
12 12
13 ## Release Procedure 13 ## Release Procedure
14 14
15 -1. Verify that the issue can be repoduced 15 +1. Verify that the issue can be reproduced
16 1. Acknowledge the issue to the researcher that disclosed it 16 1. Acknowledge the issue to the researcher that disclosed it
17 1. Do the steps from [patch release document](doc/release/patch.md), starting with "Create an issue on private GitLab development server" 17 1. Do the steps from [patch release document](doc/release/patch.md), starting with "Create an issue on private GitLab development server"
18 1. Create feature branches for the blog post on GitLab.com and link them from the code branch 18 1. Create feature branches for the blog post on GitLab.com and link them from the code branch
19 1. Merge and publish the blog posts 19 1. Merge and publish the blog posts
20 -1. Send tweets about the release from @gitlabhq 20 +1. Send tweets about the release from `@gitlabhq`
21 1. Send out an email to the subscribers mailing list on MailChimp 21 1. Send out an email to the subscribers mailing list on MailChimp
22 1. Send out an email to [the community google mailing list](https://groups.google.com/forum/#!forum/gitlabhq) 22 1. Send out an email to [the community google mailing list](https://groups.google.com/forum/#!forum/gitlabhq)
23 1. Send out an email to [the GitLab newsletter list](http://gitlab.us5.list-manage.com/subscribe?u=498dccd07cf3e9482bee33ba4&id=98a9a4992c) 23 1. Send out an email to [the GitLab newsletter list](http://gitlab.us5.list-manage.com/subscribe?u=498dccd07cf3e9482bee33ba4&id=98a9a4992c)
24 1. Post a signed copy of our complete announcement to [oss-security](http://www.openwall.com/lists/oss-security/) and request a CVE number 24 1. Post a signed copy of our complete announcement to [oss-security](http://www.openwall.com/lists/oss-security/) and request a CVE number
25 1. Add the security researcher to the [Security Researcher Acknowledgments list](http://www.gitlab.com/vulnerability-acknowledgements/) 25 1. Add the security researcher to the [Security Researcher Acknowledgments list](http://www.gitlab.com/vulnerability-acknowledgements/)
26 1. Thank the security researcher in an email for their cooperation 26 1. Thank the security researcher in an email for their cooperation
27 -1. Update the blogpost and the CHANGELOG when we receive the CVE number 27 +1. Update the blog post and the CHANGELOG when we receive the CVE number
28 28
29 The timing of the code merge into master should be coordinated in advance. 29 The timing of the code merge into master should be coordinated in advance.
  30 +
30 After the merge we strive to publish the announcements within 60 minutes. 31 After the merge we strive to publish the announcements within 60 minutes.
31 32
32 ## Blog post template 33 ## Blog post template
33 34
34 XXX Security Advisory for GitLab 35 XXX Security Advisory for GitLab
35 36
36 -A recently discovered critical vulnerability in GitLab allows [unauthenticated API access|remote code execution|unauthorized access to repositories|XXX|PICKSOMETHING]. All users should update GitLab and gitlab-shell immediately.  
37 -We [have|haven't|XXX|PICKSOMETHING|] heard of this vulnerability being actively exploited. 37 +A recently discovered critical vulnerability in GitLab allows [unauthenticated API access|remote code execution|unauthorized access to repositories|XXX|PICKSOMETHING]. All users should update GitLab and gitlab-shell immediately. We [have|haven't|XXX|PICKSOMETHING|] heard of this vulnerability being actively exploited.
38 38
39 ### Version affected 39 ### Version affected
40 40
41 GitLab Community Edition XXX and lower 41 GitLab Community Edition XXX and lower
  42 +
42 GitLab Enterprise Edition XXX and lower 43 GitLab Enterprise Edition XXX and lower
43 44
44 ### Fixed versions 45 ### Fixed versions
45 46
46 GitLab Community Edition XXX and up 47 GitLab Community Edition XXX and up
  48 +
47 GitLab Enterprise Edition XXX and up 49 GitLab Enterprise Edition XXX and up
48 50
49 ### Impact 51 ### Impact
doc/security/README.md
1 -+ [Password length limits](password_length_limits.md)  
2 -+ [Rack attack](rack_attack.md) 1 +# Security
  2 +
  3 +- [Password length limits](password_length_limits.md)
  4 +- [Rack attack](rack_attack.md)
doc/security/password_length_limits.md
1 # Custom password length limits 1 # Custom password length limits
2 2
3 If you want to enforce longer user passwords you can create an extra Devise initializer with the steps below. 3 If you want to enforce longer user passwords you can create an extra Devise initializer with the steps below.
  4 +
4 If you do not use the `devise_password_length.rb` initializer the password length is set to a minimum of 8 characters in `config/initializers/devise.rb`. 5 If you do not use the `devise_password_length.rb` initializer the password length is set to a minimum of 8 characters in `config/initializers/devise.rb`.
5 6
6 ```bash 7 ```bash
doc/security/rack_attack.md
1 # Rack attack 1 # Rack attack
2 2
3 To prevent abusive clients doing damage GitLab uses rack-attack gem. 3 To prevent abusive clients doing damage GitLab uses rack-attack gem.
  4 +
4 If you installed or upgraded GitLab by following the official guides this should be enabled by default. 5 If you installed or upgraded GitLab by following the official guides this should be enabled by default.
  6 +
5 If you are missing `config/initializers/rack_attack.rb` the following steps need to be taken in order to enable protection for your GitLab instance: 7 If you are missing `config/initializers/rack_attack.rb` the following steps need to be taken in order to enable protection for your GitLab instance:
6 8
7 -1. In config/application.rb find and uncomment the following line:  
8 - config.middleware.use Rack::Attack  
9 -2. Rename config/initializers/rack_attack.rb.example to config/initializers/rack_attack.rb  
10 -3. Review the paths_to_be_protected and add any other path you need protecting  
11 -4. Restart GitLab instance 9 +1. In config/application.rb find and uncomment the following line:
  10 +
  11 + config.middleware.use Rack::Attack
  12 +
  13 +1. Rename `config/initializers/rack_attack.rb.example` to `config/initializers/rack_attack.rb`.
  14 +
  15 +1. Review the `paths_to_be_protected` and add any other path you need protecting.
  16 +
  17 +1. Restart GitLab instance.
12 18
13 -By default, user sign-in, user sign-up(if enabled) and user password reset is limited to 6 requests per minute.  
14 -After trying for 6 times, client will have to wait for the next minute to be able to try again.  
15 -These settings can be found in `config/initializers/rack_attack.rb` 19 +By default, user sign-in, user sign-up(if enabled) and user password reset is limited to 6 requests per minute. After trying for 6 times, client will have to wait for the next minute to be able to try again. These settings can be found in `config/initializers/rack_attack.rb`
16 20
17 If you want more restrictive/relaxed throttle rule change the `limit` or `period` values. For example, more relaxed throttle rule will be if you set limit: 3 and period: 1.second(this will allow 3 requests per second). You can also add other paths to the protected list by adding to `paths_to_be_protected` variable. If you change any of these settings do not forget to restart your GitLab instance. 21 If you want more restrictive/relaxed throttle rule change the `limit` or `period` values. For example, more relaxed throttle rule will be if you set limit: 3 and period: 1.second(this will allow 3 requests per second). You can also add other paths to the protected list by adding to `paths_to_be_protected` variable. If you change any of these settings do not forget to restart your GitLab instance.
18 22
doc/ssh/README.md
1 -+ [Deploy keys](deploy_keys.md)  
2 -+ [SSH](ssh.md) 1 +# SSH
  2 +
  3 +- [Deploy keys](deploy_keys.md)
  4 +- [SSH](ssh.md)
doc/ssh/deploy_keys.md
@@ -2,13 +2,8 @@ @@ -2,13 +2,8 @@
2 2
3 Deploy keys allow read-only access one or multiple projects with a single SSH key. 3 Deploy keys allow read-only access one or multiple projects with a single SSH key.
4 4
5 -This is really useful for cloning repositories to your Continuous Integration (CI) server.  
6 -By using a deploy keys you don't have to setup a dummy user account. 5 +This is really useful for cloning repositories to your Continuous Integration (CI) server. By using a deploy keys you don't have to setup a dummy user account.
7 6
8 -If you are a project master or owner you can add a deploy key in the project settings under the section Deploy Keys.  
9 -Press the 'New Deploy Key' button and upload a public ssh key.  
10 -After this the machine that uses the corresponding private key has read-only access to the project. 7 +If you are a project master or owner you can add a deploy key in the project settings under the section Deploy Keys. Press the 'New Deploy Key' button and upload a public ssh key. After this the machine that uses the corresponding private key has read-only access to the project.
11 8
12 -You can't add the same deploy key twice with the 'New Deploy Key' option.  
13 -If you want to add the same key to another project please enable it in the list that says 'Deploy keys from projects available to you'.  
14 -All the deploy keys of all the projects you have access to are available. This project access can happen through being a direct member of the project or through a group. See `def accessible_deploy_keys` in `app/models/user.rb` for more information. 9 +You can't add the same deploy key twice with the 'New Deploy Key' option. If you want to add the same key to another project please enable it in the list that says 'Deploy keys from projects available to you'. All the deploy keys of all the projects you have access to are available. This project access can happen through being a direct member of the project or through a group. See `def accessible_deploy_keys` in `app/models/user.rb` for more information.
doc/ssh/ssh.md
@@ -2,13 +2,9 @@ @@ -2,13 +2,9 @@
2 2
3 SSH key allows you to establish a secure connection between your computer and GitLab 3 SSH key allows you to establish a secure connection between your computer and GitLab
4 4
  5 +Before generating an SSH key, check if your system already has one by running `cat ~/.ssh/id_rsa.pub` If your see a long string starting with `ssh-rsa` or `ssh-dsa`, you can skip the ssh-keygen step.
5 6
6 -Before generating an SSH key, check if your system already has one by running `cat ~/.ssh/id_rsa.pub`  
7 -If your see a long string starting with `ssh-rsa` or `ssh-dsa`, you can skip the ssh-keygen step.  
8 -  
9 -  
10 -To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password.  
11 -When prompted for the location and filename you can press enter to use the default. 7 +To generate a new SSH key just open your terminal and use code below. The ssh-keygen command prompts you for a location and filename to store the key pair and for a password. When prompted for the location and filename you can press enter to use the default.
12 It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter. 8 It is a best practice to use a password for an SSH key but it is not required and you can skip creating a password by pressing enter.
13 Note that the password you choose here can't be altered or retrieved. 9 Note that the password you choose here can't be altered or retrieved.
14 10
@@ -22,5 +18,4 @@ Use the code below to show your public key. @@ -22,5 +18,4 @@ Use the code below to show your public key.
22 cat ~/.ssh/id_rsa.pub 18 cat ~/.ssh/id_rsa.pub
23 ``` 19 ```
24 20
25 -Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile.  
26 -Please copy the complete key starting with `ssh-` and ending with your username and host. 21 +Copy-paste the key to the 'My SSH Keys' section under the 'SSH' tab in your user profile. Please copy the complete key starting with `ssh-` and ending with your username and host.
doc/system_hooks/system_hooks.md
@@ -4,7 +4,7 @@ Your GitLab instance can perform HTTP POST requests on the following events: `cr @@ -4,7 +4,7 @@ Your GitLab instance can perform HTTP POST requests on the following events: `cr
4 4
5 System hooks can be used, e.g. for logging or changing information in a LDAP server. 5 System hooks can be used, e.g. for logging or changing information in a LDAP server.
6 6
7 -#### Hooks request example: 7 +## Hooks request example
8 8
9 **Project created:** 9 **Project created:**
10 10
@@ -73,23 +73,23 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser @@ -73,23 +73,23 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser
73 **User created:** 73 **User created:**
74 74
75 ```json 75 ```json
76 -{ 76 +{
77 "created_at": "2012-07-21T07:44:07Z", 77 "created_at": "2012-07-21T07:44:07Z",
78 "email": "js@gitlabhq.com", 78 "email": "js@gitlabhq.com",
79 "event_name": "user_create", 79 "event_name": "user_create",
80 - "name": "John Smith",  
81 - "user_id": 41 80 + "name": "John Smith",
  81 + "user_id": 41
82 } 82 }
83 ``` 83 ```
84 84
85 **User removed:** 85 **User removed:**
86 86
87 ```json 87 ```json
88 -{ 88 +{
89 "created_at": "2012-07-21T07:44:07Z", 89 "created_at": "2012-07-21T07:44:07Z",
90 "email": "js@gitlabhq.com", 90 "email": "js@gitlabhq.com",
91 "event_name": "user_destroy", 91 "event_name": "user_destroy",
92 "name": "John Smith", 92 "name": "John Smith",
93 - "user_id": 41 93 + "user_id": 41
94 } 94 }
95 ``` 95 ```
doc/update/2.6-to-3.0.md
1 # From 2.6 to 3.0 1 # From 2.6 to 3.0
2 2
3 -### 1. Stop server & resque 3 +## 1. Stop server & resque
4 4
5 sudo service gitlab stop 5 sudo service gitlab stop
6 6
7 -### 2. Update code & db 7 +## 2. Update code & db
8 8
9 9
10 ```bash 10 ```bash
@@ -54,10 +54,8 @@ sudo -u git -H sed -i &quot;s/\(GIT_CONFIG_KEYS\s*=&gt;*\s*\).\{2\}/\\1&#39;\.\*&#39;/g&quot; /home/g @@ -54,10 +54,8 @@ sudo -u git -H sed -i &quot;s/\(GIT_CONFIG_KEYS\s*=&gt;*\s*\).\{2\}/\\1&#39;\.\*&#39;/g&quot; /home/g
54 # Check app status 54 # Check app status
55 sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production 55 sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
56 56
57 -  
58 ``` 57 ```
59 58
60 -  
61 -### 3. Start all 59 +## 3. Start all
62 60
63 sudo service gitlab start 61 sudo service gitlab start
doc/update/2.9-to-3.0.md
1 # From 2.9 to 3.0 1 # From 2.9 to 3.0
2 2
3 -### 1. Stop server & resque 3 +## 1. Stop server & resque
4 4
5 sudo service gitlab stop 5 sudo service gitlab stop
6 6
7 -### 2. Follow instructions 7 +## 2. Follow instructions
8 8
9 ```bash 9 ```bash
10 10
@@ -31,7 +31,6 @@ sudo -u git -H sed -i &#39;s/\(GL_GITCONFIG_KEYS\s*=&gt;*\s*\).\{2\}/\\1&quot;\.\*&quot;/g&#39; /home @@ -31,7 +31,6 @@ sudo -u git -H sed -i &#39;s/\(GL_GITCONFIG_KEYS\s*=&gt;*\s*\).\{2\}/\\1&quot;\.\*&quot;/g&#39; /home
31 sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production 31 sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
32 ``` 32 ```
33 33
34 -  
35 -### 3. Start all 34 +## 3. Start all
36 35
37 sudo service gitlab start 36 sudo service gitlab start
doc/update/3.0-to-3.1.md
1 # From 3.0 to 3.1 1 # From 3.0 to 3.1
2 2
3 -__IMPORTANT!__ 3 +**IMPORTANT!**
4 4
5 -In this release __we moved Resque jobs under own gitlab namespace__. 5 +In this release **we moved Resque jobs under own gitlab namespace**
6 6
7 -Despite a lot of advantages it requires from our users to __replace gitolite post-receive hook with new one__. 7 +Despite a lot of advantages it requires from our users to **replace gitolite post-receive hook with new one**.
8 8
9 -Most of projects has post-receive file as symlink to gitolite `/home/git/.gitolite/hooks/post-receive`.  
10 -But some of them may have a real file. In this case you should rewrite it with symlink to gitolite hook. 9 +Most of projects has post-receive file as symlink to gitolite `/home/git/.gitolite/hooks/post-receive`. But some of them may have a real file. In this case you should rewrite it with symlink to gitolite hook.
11 10
12 I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you 11 I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you
13 12
14 -- - -  
15 -  
16 -### 1. Stop server & resque 13 +## 1. Stop server & resque
17 14
18 sudo service gitlab stop 15 sudo service gitlab stop
19 16
20 -### 2. Update GitLab 17 +## 2. Update GitLab
21 18
22 ```bash 19 ```bash
23 -  
24 # Get latest code 20 # Get latest code
25 sudo -u gitlab -H git fetch 21 sudo -u gitlab -H git fetch
26 sudo -u gitlab -H git checkout v3.1.0 22 sudo -u gitlab -H git checkout v3.1.0
@@ -35,12 +31,11 @@ sudo -u gitlab -H bundle install --without development test postgres sqlite @@ -35,12 +31,11 @@ sudo -u gitlab -H bundle install --without development test postgres sqlite
35 # Migrate db 31 # Migrate db
36 sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production 32 sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
37 33
38 -  
39 ``` 34 ```
40 35
41 -### 3. Update post-receive hooks 36 +## 3. Update post-receive hooks
42 37
43 -#### Gitolite 3 38 +### Gitolite 3
44 39
45 Step 1: Rewrite post-receive hook 40 Step 1: Rewrite post-receive hook
46 41
@@ -60,7 +55,7 @@ sudo -u gitlab -H vim lib/support/rewrite-hooks.sh @@ -60,7 +55,7 @@ sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
60 sudo -u git -H lib/support/rewrite-hooks.sh 55 sudo -u git -H lib/support/rewrite-hooks.sh
61 ``` 56 ```
62 57
63 -#### Gitolite v2 58 +### Gitolite v2
64 59
65 Step 1: rewrite post-receive hook for gitolite 2 60 Step 1: rewrite post-receive hook for gitolite 2
66 61
@@ -71,7 +66,6 @@ sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive @@ -71,7 +66,6 @@ sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
71 66
72 Step 2: Replace symlinks in project to valid place 67 Step 2: Replace symlinks in project to valid place
73 68
74 -  
75 #!/bin/bash 69 #!/bin/bash
76 src="/home/git/repositories" 70 src="/home/git/repositories"
77 for dir in `ls "$src/"` 71 for dir in `ls "$src/"`
@@ -90,19 +84,13 @@ Step 2: Replace symlinks in project to valid place @@ -90,19 +84,13 @@ Step 2: Replace symlinks in project to valid place
90 fi 84 fi
91 done 85 done
92 86
93 -  
94 -### 4. Check app status 87 +## 4. Check app status
95 88
96 ```bash 89 ```bash
97 -  
98 # Check APP Status 90 # Check APP Status
99 sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production 91 sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
100 -  
101 -  
102 -  
103 ``` 92 ```
104 93
105 -  
106 -### 5. Start all 94 +## 5. Start all
107 95
108 sudo service gitlab start 96 sudo service gitlab start
doc/update/3.1-to-4.0.md
@@ -2,25 +2,22 @@ @@ -2,25 +2,22 @@
2 2
3 ## Important changes 3 ## Important changes
4 4
5 -* Support for SQLite was dropped  
6 -* Support for gitolite 2 was dropped  
7 -* Projects are organized in namespaces  
8 -* The GitLab post-receive hook needs to be updated  
9 -* The configuration file needs to be updated  
10 -* Availability of `python2` executable 5 +- Support for SQLite was dropped
  6 +- Support for Gitolite 2 was dropped
  7 +- Projects are organized in namespaces
  8 +- The GitLab post-receive hook needs to be updated
  9 +- The configuration file needs to be updated
  10 +- Availability of `python2` executable
11 11
12 -Most of projects has post-receive file as symlink to gitolite `/home/git/.gitolite/hooks/post-receive`.  
13 -But some of them may have a real file. In this case you should rewrite it with symlink to gitolite hook. 12 +Most of projects has post-receive file as symlink to Gitolite `/home/git/.gitolite/hooks/post-receive`. But some of them may have a real file. In this case you should rewrite it with symlink to Gitolite hook.
14 13
15 I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you 14 I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you
16 15
17 -- - -  
18 -  
19 -### 1. Stop GitLab & Resque 16 +## 1. Stop GitLab & Resque
20 17
21 sudo service gitlab stop 18 sudo service gitlab stop
22 19
23 -### 2. Update GitLab 20 +## 2. Update GitLab
24 21
25 ```bash 22 ```bash
26 23
@@ -43,8 +40,7 @@ sudo -u gitlab -H bundle exec rake gitlab:enable_namespaces RAILS_ENV=production @@ -43,8 +40,7 @@ sudo -u gitlab -H bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
43 40
44 ``` 41 ```
45 42
46 -### 3. Update post-receive hooks (Requires gitolite v3 )  
47 - 43 +## 3. Update post-receive hooks (Requires Gitolite v3 )
48 44
49 Step 1: Rewrite post-receive hook 45 Step 1: Rewrite post-receive hook
50 46
@@ -63,9 +59,7 @@ sudo -u gitlab -H vim lib/support/rewrite-hooks.sh @@ -63,9 +59,7 @@ sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
63 sudo -u git -H lib/support/rewrite-hooks.sh 59 sudo -u git -H lib/support/rewrite-hooks.sh
64 ``` 60 ```
65 61
66 -  
67 -### 4. Replace config with new one  
68 - 62 +## 4. Replace config with new one
69 63
70 # backup old one 64 # backup old one
71 sudo -u gitlab -H cp config/gitlab.yml config/gitlab.yml.old 65 sudo -u gitlab -H cp config/gitlab.yml config/gitlab.yml.old
@@ -76,9 +70,7 @@ sudo -u git -H lib/support/rewrite-hooks.sh @@ -76,9 +70,7 @@ sudo -u git -H lib/support/rewrite-hooks.sh
76 # edit it 70 # edit it
77 sudo -u gitlab -H vim config/gitlab.yml 71 sudo -u gitlab -H vim config/gitlab.yml
78 72
79 -  
80 -### 5. Disable ssh known_host check for own domain  
81 - 73 +## 5. Disable ssh known_host check for own domain
82 74
83 echo "Host localhost 75 echo "Host localhost
84 StrictHostKeyChecking no 76 StrictHostKeyChecking no
@@ -88,12 +80,10 @@ sudo -u git -H lib/support/rewrite-hooks.sh @@ -88,12 +80,10 @@ sudo -u git -H lib/support/rewrite-hooks.sh
88 StrictHostKeyChecking no 80 StrictHostKeyChecking no
89 UserKnownHostsFile=/dev/null" | sudo tee -a /etc/ssh/ssh_config 81 UserKnownHostsFile=/dev/null" | sudo tee -a /etc/ssh/ssh_config
90 82
91 -  
92 -### 6. Check GitLab's status 83 +## 6. Check GitLab's status
93 84
94 sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production 85 sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
95 86
96 -  
97 -### 7. Start GitLab & Resque 87 +## 7. Start GitLab & Resque
98 88
99 sudo service gitlab start 89 sudo service gitlab start
doc/update/4.0-to-4.1.md
@@ -2,18 +2,16 @@ @@ -2,18 +2,16 @@
2 2
3 ## Important changes 3 ## Important changes
4 4
5 -* Resque replaced with Sidekiq  
6 -* New options for configuration file added  
7 -* Init.d script should be updated  
8 -* __requires ruby1.9.3-p327__ 5 +- Resque replaced with Sidekiq
  6 +- New options for configuration file added
  7 +- Init.d script should be updated
  8 +- **requires ruby1.9.3-p327**
9 9
10 -- - -  
11 -  
12 -### 1. Stop GitLab & Resque 10 +## 1. Stop GitLab & Resque
13 11
14 sudo service gitlab stop 12 sudo service gitlab stop
15 13
16 -### 2. Update GitLab 14 +## 2. Update GitLab
17 15
18 ```bash 16 ```bash
19 # Set the working directory 17 # Set the working directory
@@ -31,7 +29,7 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production @@ -31,7 +29,7 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
31 29
32 ``` 30 ```
33 31
34 -### 3. Replace init.d script with a new one 32 +## 3. Replace init.d script with a new one
35 33
36 ``` 34 ```
37 # backup old one 35 # backup old one
@@ -43,15 +41,15 @@ sudo chmod +x /etc/init.d/gitlab @@ -43,15 +41,15 @@ sudo chmod +x /etc/init.d/gitlab
43 41
44 ``` 42 ```
45 43
46 -### 4. Check GitLab's status 44 +## 4. Check GitLab's status
47 45
48 sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production 46 sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
49 47
50 48
51 -### 5. Start GitLab & Sidekiq 49 +## 5. Start GitLab & Sidekiq
52 50
53 sudo service gitlab start 51 sudo service gitlab start
54 52
55 -### 6. Remove old init.d script 53 +## 6. Remove old init.d script
56 54
57 sudo rm /etc/init.d/gitlab.old 55 sudo rm /etc/init.d/gitlab.old
doc/update/4.1-to-4.2.md
1 # From 4.1 to 4.2 1 # From 4.1 to 4.2
2 2
3 -### 1. Stop server & resque 3 +## 1. Stop server & Resque
4 4
5 sudo service gitlab stop 5 sudo service gitlab stop
6 6
7 -### 2. Update code & db 7 +## 2. Update code & DB
8 8
9 ```bash 9 ```bash
10 10
@@ -24,15 +24,12 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production @@ -24,15 +24,12 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
24 24
25 ``` 25 ```
26 26
27 -  
28 -### 3. Check GitLab's status 27 +## 3. Check GitLab's status
29 28
30 ```bash 29 ```bash
31 sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production 30 sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
32 ``` 31 ```
33 32
34 -  
35 -  
36 -### 4. Start all 33 +## 4. Start all
37 34
38 sudo service gitlab start 35 sudo service gitlab start
doc/update/4.2-to-5.0.md
1 # From 4.2 to 5.0 1 # From 4.2 to 5.0
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 5.0 is affected by critical security vulnerability CVE-2013-4490. 5 GitLab 5.0 is affected by critical security vulnerability CVE-2013-4490.
5 6
6 ## Important changes 7 ## Important changes
7 8
8 -* We don't use `gitlab` user any more. Everything will be moved to `git` user  
9 -* __requires ruby1.9.3__  
10 - 9 +- We don't use `gitlab` user any more. Everything will be moved to `git` user
  10 +- **requires ruby1.9.3**
11 11
12 -__0. Stop gitlab__ 12 +## 0. Stop gitlab
13 13
14 sudo service gitlab stop 14 sudo service gitlab stop
15 15
16 -__1. add bash to git user__ 16 +## 1. add bash to git user
17 17
18 ``` 18 ```
19 sudo chsh -s /bin/bash git 19 sudo chsh -s /bin/bash git
20 ``` 20 ```
21 21
22 -__2. git clone gitlab-shell__ 22 +## 2. git clone gitlab-shell
23 23
24 ``` 24 ```
25 cd /home/git/ 25 cd /home/git/
26 sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git /home/git/gitlab-shell 26 sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git /home/git/gitlab-shell
27 ``` 27 ```
28 28
29 -__3. setup gitlab-shell__ 29 +## 3. setup gitlab-shell
30 30
31 ```bash 31 ```bash
32 # chmod all repos and files under git 32 # chmod all repos and files under git
@@ -55,7 +55,7 @@ ruby -v @@ -55,7 +55,7 @@ ruby -v
55 exit 55 exit
56 ``` 56 ```
57 57
58 -__4. Copy gitlab instance to git user__ 58 +## 4. Copy gitlab instance to git user
59 59
60 ```bash 60 ```bash
61 sudo cp -R /home/gitlab/gitlab /home/git/gitlab 61 sudo cp -R /home/gitlab/gitlab /home/git/gitlab
@@ -66,7 +66,7 @@ sudo rm -rf /home/gitlab/gitlab-satellites @@ -66,7 +66,7 @@ sudo rm -rf /home/gitlab/gitlab-satellites
66 sudo rm /tmp/gitlab.socket 66 sudo rm /tmp/gitlab.socket
67 ``` 67 ```
68 68
69 -__5. Update gitlab to recent version__ 69 +## 5. Update gitlab to recent version
70 70
71 ```bash 71 ```bash
72 cd /home/git/gitlab 72 cd /home/git/gitlab
@@ -110,7 +110,7 @@ sudo chmod -R u+rwX /home/git/gitlab/tmp/pids @@ -110,7 +110,7 @@ sudo chmod -R u+rwX /home/git/gitlab/tmp/pids
110 110
111 ``` 111 ```
112 112
113 -__6. Update init.d script and nginx config__ 113 +## 6. Update init.d script and nginx config
114 114
115 ```bash 115 ```bash
116 # init.d 116 # init.d
@@ -127,14 +127,11 @@ sudo -u git -H cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/co @@ -127,14 +127,11 @@ sudo -u git -H cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/co
127 sudo vim /etc/nginx/sites-enabled/gitlab 127 sudo vim /etc/nginx/sites-enabled/gitlab
128 sudo service nginx restart 128 sudo service nginx restart
129 129
130 -  
131 ``` 130 ```
132 131
133 -__7. Start gitlab instance__ 132 +## 7. Start GitLab instance
134 133
135 ``` 134 ```
136 -  
137 -  
138 sudo service gitlab start 135 sudo service gitlab start
139 136
140 # check if unicorn and sidekiq started 137 # check if unicorn and sidekiq started
@@ -145,7 +142,7 @@ ps aux | grep sidekiq @@ -145,7 +142,7 @@ ps aux | grep sidekiq
145 142
146 ``` 143 ```
147 144
148 -__8. Check installation__ 145 +## 8. Check installation
149 146
150 147
151 ```bash 148 ```bash
@@ -164,5 +161,4 @@ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production @@ -164,5 +161,4 @@ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
164 161
165 ``` 162 ```
166 163
167 -  
168 -__P.S. If everything works as expected you can remove gitlab user from system__ 164 +**P.S. If everything works as expected you can remove gitlab user from system**
doc/update/5.0-to-5.1.md
1 # From 5.0 to 5.1 1 # From 5.0 to 5.1
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 5.1 is affected by critical security vulnerability CVE-2013-4490. 5 GitLab 5.1 is affected by critical security vulnerability CVE-2013-4490.
5 6
6 -## Release notes: 7 +## Release notes
7 8
8 -* `unicorn` replaced with `puma`  
9 -* merge request cached diff will be truncated 9 +- `unicorn` replaced with `puma`
  10 +- merge request cached diff will be truncated
10 11
11 -### 1. Stop server 12 +## 1. Stop server
12 13
13 sudo service gitlab stop 14 sudo service gitlab stop
14 15
15 -### 2. Get latest code 16 +## 2. Get latest code
16 17
17 ```bash 18 ```bash
18 cd /home/git/gitlab 19 cd /home/git/gitlab
@@ -20,7 +21,7 @@ sudo -u git -H git fetch @@ -20,7 +21,7 @@ sudo -u git -H git fetch
20 sudo -u git -H git checkout 5-1-stable 21 sudo -u git -H git checkout 5-1-stable
21 ``` 22 ```
22 23
23 -### 3. Update gitlab-shell 24 +## 3. Update gitlab-shell
24 25
25 ```bash 26 ```bash
26 cd /home/git/gitlab-shell 27 cd /home/git/gitlab-shell
@@ -33,8 +34,7 @@ sudo -u git -H cp config.yml.example config.yml @@ -33,8 +34,7 @@ sudo -u git -H cp config.yml.example config.yml
33 sudo -u git -H vi config.yml 34 sudo -u git -H vi config.yml
34 ``` 35 ```
35 36
36 -  
37 -### 4. Install libs, migrations etc 37 +## 4. Install libs, migrations etc
38 38
39 ```bash 39 ```bash
40 cd /home/git/gitlab 40 cd /home/git/gitlab
@@ -47,7 +47,7 @@ sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production @@ -47,7 +47,7 @@ sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production
47 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 47 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
48 ``` 48 ```
49 49
50 -### 5. Update init.d script with a new one 50 +## 5. Update init.d script with a new one
51 51
52 ```bash 52 ```bash
53 # init.d 53 # init.d
@@ -56,9 +56,9 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-rec @@ -56,9 +56,9 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-rec
56 sudo chmod +x /etc/init.d/gitlab 56 sudo chmod +x /etc/init.d/gitlab
57 ``` 57 ```
58 58
59 -### 6. Mysql grant privileges 59 +## 6. MySQL grant privileges
60 60
61 -Only if you are using mysql: 61 +Only if you are using MySQL:
62 62
63 ```bash 63 ```bash
64 mysql -u root -p 64 mysql -u root -p
@@ -66,6 +66,6 @@ mysql&gt; GRANT LOCK TABLES ON `gitlabhq_production`.* TO &#39;gitlab&#39;@&#39;localhost&#39;; @@ -66,6 +66,6 @@ mysql&gt; GRANT LOCK TABLES ON `gitlabhq_production`.* TO &#39;gitlab&#39;@&#39;localhost&#39;;
66 mysql> \q 66 mysql> \q
67 ``` 67 ```
68 68
69 -### 7. Start application 69 +## 7. Start application
70 70
71 sudo service gitlab start 71 sudo service gitlab start
doc/update/5.1-to-5.2.md
1 # From 5.1 to 5.2 1 # From 5.1 to 5.2
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 5.2 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489. 5 GitLab 5.2 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
5 6
6 -### 0. Backup 7 +## 0. Backup
7 8
8 It's useful to make a backup just in case things go south: 9 It's useful to make a backup just in case things go south:
9 (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 10 (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)
@@ -13,11 +14,11 @@ cd /home/git/gitlab @@ -13,11 +14,11 @@ cd /home/git/gitlab
13 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 14 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
14 ``` 15 ```
15 16
16 -### 1. Stop server 17 +## 1. Stop server
17 18
18 sudo service gitlab stop 19 sudo service gitlab stop
19 20
20 -### 2. Get latest code 21 +## 2. Get latest code
21 22
22 ```bash 23 ```bash
23 cd /home/git/gitlab 24 cd /home/git/gitlab
@@ -25,7 +26,7 @@ sudo -u git -H git fetch @@ -25,7 +26,7 @@ sudo -u git -H git fetch
25 sudo -u git -H git checkout 5-2-stable 26 sudo -u git -H git checkout 5-2-stable
26 ``` 27 ```
27 28
28 -### 3. Update gitlab-shell 29 +## 3. Update gitlab-shell
29 30
30 ```bash 31 ```bash
31 cd /home/git/gitlab-shell 32 cd /home/git/gitlab-shell
@@ -33,7 +34,7 @@ sudo -u git -H git fetch @@ -33,7 +34,7 @@ sudo -u git -H git fetch
33 sudo -u git -H git checkout v1.4.0 34 sudo -u git -H git checkout v1.4.0
34 ``` 35 ```
35 36
36 -### 4. Install libs, migrations, etc. 37 +## 4. Install libs, migrations, etc.
37 38
38 ```bash 39 ```bash
39 cd /home/git/gitlab 40 cd /home/git/gitlab
@@ -49,12 +50,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production @@ -49,12 +50,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
49 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 50 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
50 ``` 51 ```
51 52
52 -### 5. Update config files 53 +## 5. Update config files
53 54
54 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-2-stable/config/gitlab.yml.example but with your settings.  
55 -* Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-2-stable/config/puma.rb.example but with your settings. 55 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-2-stable/config/gitlab.yml.example but with your settings.
  56 +- Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-2-stable/config/puma.rb.example but with your settings.
56 57
57 -### 6. Update Init script 58 +## 6. Update Init script
58 59
59 ```bash 60 ```bash
60 cd /home/git/gitlab 61 cd /home/git/gitlab
@@ -63,7 +64,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab @@ -63,7 +64,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
63 sudo chmod +x /etc/init.d/gitlab 64 sudo chmod +x /etc/init.d/gitlab
64 ``` 65 ```
65 66
66 -### 7. Create uploads directory 67 +## 7. Create uploads directory
67 68
68 ```bash 69 ```bash
69 cd /home/git/gitlab 70 cd /home/git/gitlab
@@ -71,12 +72,12 @@ sudo -u git -H mkdir public/uploads @@ -71,12 +72,12 @@ sudo -u git -H mkdir public/uploads
71 sudo chmod -R u+rwX public/uploads 72 sudo chmod -R u+rwX public/uploads
72 ``` 73 ```
73 74
74 -### 8. Start application 75 +## 8. Start application
75 76
76 sudo service gitlab start 77 sudo service gitlab start
77 sudo service nginx restart 78 sudo service nginx restart
78 79
79 -### 9. Check application status 80 +## 9. Check application status
80 81
81 Check if GitLab and its environment are configured correctly: 82 Check if GitLab and its environment are configured correctly:
82 83
@@ -91,10 +92,10 @@ If all items are green, then congratulations upgrade complete! @@ -91,10 +92,10 @@ If all items are green, then congratulations upgrade complete!
91 ## Things went south? Revert to previous version (5.1) 92 ## Things went south? Revert to previous version (5.1)
92 93
93 ### 1. Revert the code to the previous version 94 ### 1. Revert the code to the previous version
94 -Follow the [`upgrade guide from 5.0 to 5.1`](5.0-to-5.1.md), except for the database migration  
95 -(The backup is already migrated to the previous version)  
96 95
97 -### 2. Restore from the backup: 96 +Follow the [`upgrade guide from 5.0 to 5.1`](5.0-to-5.1.md), except for the database migration (the backup is already migrated to the previous version).
  97 +
  98 +### 2. Restore from the backup
98 99
99 ```bash 100 ```bash
100 cd /home/git/gitlab 101 cd /home/git/gitlab
doc/update/5.1-to-5.4.md
1 # From 5.1 to 5.4 1 # From 5.1 to 5.4
  2 +
2 Also works starting from 5.2. 3 Also works starting from 5.2.
3 4
4 -### 0. Backup 5 +## 0. Backup
5 6
6 -It's useful to make a backup just in case things go south:  
7 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 7 +It's useful to make a backup just in case things go south (with MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version):
8 8
9 ```bash 9 ```bash
10 cd /home/git/gitlab 10 cd /home/git/gitlab
11 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 11 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
12 ``` 12 ```
13 13
14 -### 1. Stop server 14 +## 1. Stop server
15 15
16 sudo service gitlab stop 16 sudo service gitlab stop
17 17
18 -### 2. Get latest code 18 +## 2. Get latest code
19 19
20 ```bash 20 ```bash
21 cd /home/git/gitlab 21 cd /home/git/gitlab
@@ -23,7 +23,7 @@ sudo -u git -H git fetch @@ -23,7 +23,7 @@ sudo -u git -H git fetch
23 sudo -u git -H git checkout 5-4-stable # Latest version of 5-4-stable addresses CVE-2013-4489 23 sudo -u git -H git checkout 5-4-stable # Latest version of 5-4-stable addresses CVE-2013-4489
24 ``` 24 ```
25 25
26 -### 3. Update gitlab-shell 26 +## 3. Update gitlab-shell
27 27
28 ```bash 28 ```bash
29 cd /home/git/gitlab-shell 29 cd /home/git/gitlab-shell
@@ -31,7 +31,7 @@ sudo -u git -H git fetch @@ -31,7 +31,7 @@ sudo -u git -H git fetch
31 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities 31 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
32 ``` 32 ```
33 33
34 -### 4. Install libs, migrations, etc. 34 +## 4. Install libs, migrations, etc.
35 35
36 ```bash 36 ```bash
37 cd /home/git/gitlab 37 cd /home/git/gitlab
@@ -47,12 +47,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production @@ -47,12 +47,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
47 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 47 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
48 ``` 48 ```
49 49
50 -### 5. Update config files 50 +## 5. Update config files
51 51
52 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/gitlab.yml.example but with your settings.  
53 -* Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/puma.rb.example but with your settings. 52 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/gitlab.yml.example but with your settings.
  53 +- Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/puma.rb.example but with your settings.
54 54
55 -### 6. Update Init script 55 +## 6. Update Init script
56 56
57 ```bash 57 ```bash
58 sudo rm /etc/init.d/gitlab 58 sudo rm /etc/init.d/gitlab
@@ -60,7 +60,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab @@ -60,7 +60,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
60 sudo chmod +x /etc/init.d/gitlab 60 sudo chmod +x /etc/init.d/gitlab
61 ``` 61 ```
62 62
63 -### 7. Create uploads directory 63 +## 7. Create uploads directory
64 64
65 ```bash 65 ```bash
66 cd /home/git/gitlab 66 cd /home/git/gitlab
@@ -68,13 +68,12 @@ sudo -u git -H mkdir public/uploads @@ -68,13 +68,12 @@ sudo -u git -H mkdir public/uploads
68 sudo chmod -R u+rwX public/uploads 68 sudo chmod -R u+rwX public/uploads
69 ``` 69 ```
70 70
71 -  
72 -### 8. Start application 71 +## 8. Start application
73 72
74 sudo service gitlab start 73 sudo service gitlab start
75 sudo service nginx restart 74 sudo service nginx restart
76 75
77 -### 9. Check application status 76 +## 9. Check application status
78 77
79 Check if GitLab and its environment are configured correctly: 78 Check if GitLab and its environment are configured correctly:
80 79
@@ -89,8 +88,8 @@ If all items are green, then congratulations upgrade complete! @@ -89,8 +88,8 @@ If all items are green, then congratulations upgrade complete!
89 ## Things went south? Revert to previous version (5.3) 88 ## Things went south? Revert to previous version (5.3)
90 89
91 ### 1. Revert the code to the previous version 90 ### 1. Revert the code to the previous version
92 -Follow the [`upgrade guide from 5.2 to 5.3`](5.2-to-5.3.md), except for the database migration  
93 -(The backup is already migrated to the previous version) 91 +
  92 +Follow the [`upgrade guide from 5.2 to 5.3`](5.2-to-5.3.md), except for the database migration (the backup is already migrated to the previous version).
94 93
95 ### 2. Restore from the backup: 94 ### 2. Restore from the backup:
96 95
doc/update/5.1-to-6.0.md
1 # From 5.1 to 6.0 1 # From 5.1 to 6.0
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489. 5 GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
5 6
6 -### Deprecations 7 +## Deprecations
7 8
8 -#### Global projects 9 +### Global projects
9 10
10 The root (global) namespace for projects is deprecated. 11 The root (global) namespace for projects is deprecated.
11 -So you need to move all your global projects under groups or users manually before update or they will be automatically moved to the project owner namespace during the update. When a project is moved all its members will receive an email with instructions how to update their git remote url. Please make sure you disable sending email when you do a test of the upgrade.  
12 12
13 -#### Teams 13 +So you need to move all your global projects under groups or users manually before update or they will be automatically moved to the project owner namespace during the update. When a project is moved all its members will receive an email with instructions how to update their git remote URL. Please make sure you disable sending email when you do a test of the upgrade.
  14 +
  15 +### Teams
14 16
15 We introduce group membership in 6.0 as a replacement for teams. 17 We introduce group membership in 6.0 as a replacement for teams.
  18 +
16 The old combination of groups and teams was confusing for a lot of people. 19 The old combination of groups and teams was confusing for a lot of people.
  20 +
17 And when the members of a team where changed this wasn't reflected in the project permissions. 21 And when the members of a team where changed this wasn't reflected in the project permissions.
  22 +
18 In GitLab 6.0 you will be able to add members to a group with a permission level for each member. 23 In GitLab 6.0 you will be able to add members to a group with a permission level for each member.
  24 +
19 These group members will have access to the projects in that group. 25 These group members will have access to the projects in that group.
  26 +
20 Any changes to group members will immediately be reflected in the project permissions. 27 Any changes to group members will immediately be reflected in the project permissions.
  28 +
21 You can even have multiple owners for a group, greatly simplifying administration. 29 You can even have multiple owners for a group, greatly simplifying administration.
22 30
23 -### 0. Backup 31 +## 0. Backup
24 32
25 It's useful to make a backup just in case things go south: 33 It's useful to make a backup just in case things go south:
26 (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 34 (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)
@@ -30,11 +38,11 @@ cd /home/git/gitlab @@ -30,11 +38,11 @@ cd /home/git/gitlab
30 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 38 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
31 ``` 39 ```
32 40
33 -### 1. Stop server 41 +## 1. Stop server
34 42
35 sudo service gitlab stop 43 sudo service gitlab stop
36 44
37 -### 2. Get latest code 45 +## 2. Get latest code
38 46
39 ```bash 47 ```bash
40 cd /home/git/gitlab 48 cd /home/git/gitlab
@@ -42,7 +50,7 @@ sudo -u git -H git fetch @@ -42,7 +50,7 @@ sudo -u git -H git fetch
42 sudo -u git -H git checkout 6-0-stable 50 sudo -u git -H git checkout 6-0-stable
43 ``` 51 ```
44 52
45 -### 3. Update gitlab-shell 53 +## 3. Update gitlab-shell
46 54
47 ```bash 55 ```bash
48 cd /home/git/gitlab-shell 56 cd /home/git/gitlab-shell
@@ -50,14 +58,14 @@ sudo -u git -H git fetch @@ -50,14 +58,14 @@ sudo -u git -H git fetch
50 sudo -u git -H git checkout v1.7.9 58 sudo -u git -H git checkout v1.7.9
51 ``` 59 ```
52 60
53 -### 4. Install additional packages 61 +## 4. Install additional packages
54 62
55 ```bash 63 ```bash
56 # For reStructuredText markup language support install required package: 64 # For reStructuredText markup language support install required package:
57 sudo apt-get install python-docutils 65 sudo apt-get install python-docutils
58 ``` 66 ```
59 67
60 -### 5. Install libs, migrations, etc. 68 +## 5. Install libs, migrations, etc.
61 69
62 ```bash 70 ```bash
63 cd /home/git/gitlab 71 cd /home/git/gitlab
@@ -83,14 +91,14 @@ sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production @@ -83,14 +91,14 @@ sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
83 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 91 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
84 ``` 92 ```
85 93
86 -### 6. Update config files 94 +## 6. Update config files
87 95
88 Note: We switched from Puma in GitLab 5.x to unicorn in GitLab 6.0. 96 Note: We switched from Puma in GitLab 5.x to unicorn in GitLab 6.0.
89 97
90 -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/masterconfig/gitlab.yml.example but with your settings.  
91 -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/masterconfig/unicorn.rb.example but with your settings. 98 +- Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/masterconfig/gitlab.yml.example but with your settings.
  99 +- Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/masterconfig/unicorn.rb.example but with your settings.
92 100
93 -### 7. Update Init script 101 +## 7. Update Init script
94 102
95 ```bash 103 ```bash
96 cd /home/git/gitlab 104 cd /home/git/gitlab
@@ -99,7 +107,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab @@ -99,7 +107,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
99 sudo chmod +x /etc/init.d/gitlab 107 sudo chmod +x /etc/init.d/gitlab
100 ``` 108 ```
101 109
102 -### 8. Create uploads directory 110 +## 8. Create uploads directory
103 111
104 ```bash 112 ```bash
105 cd /home/git/gitlab 113 cd /home/git/gitlab
@@ -107,12 +115,12 @@ sudo -u git -H mkdir -p public/uploads @@ -107,12 +115,12 @@ sudo -u git -H mkdir -p public/uploads
107 sudo chmod -R u+rwX public/uploads 115 sudo chmod -R u+rwX public/uploads
108 ``` 116 ```
109 117
110 -### 9. Start application 118 +## 9. Start application
111 119
112 sudo service gitlab start 120 sudo service gitlab start
113 sudo service nginx restart 121 sudo service nginx restart
114 122
115 -### 10. Check application status 123 +## 10. Check application status
116 124
117 Check if GitLab and its environment are configured correctly: 125 Check if GitLab and its environment are configured correctly:
118 126
@@ -127,8 +135,8 @@ If all items are green, then congratulations upgrade complete! @@ -127,8 +135,8 @@ If all items are green, then congratulations upgrade complete!
127 ## Things went south? Revert to previous version (5.1) 135 ## Things went south? Revert to previous version (5.1)
128 136
129 ### 1. Revert the code to the previous version 137 ### 1. Revert the code to the previous version
130 -Follow the [`upgrade guide from 5.0 to 5.1`](5.0-to-5.1.md), except for the database migration  
131 -(The backup is already migrated to the previous version) 138 +
  139 +Follow the [`upgrade guide from 5.0 to 5.1`](5.0-to-5.1.md), except for the database migration (the backup is already migrated to the previous version).
132 140
133 ### 2. Restore from the backup: 141 ### 2. Restore from the backup:
134 142
@@ -137,20 +145,24 @@ cd /home/git/gitlab @@ -137,20 +145,24 @@ cd /home/git/gitlab
137 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production 145 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
138 ``` 146 ```
139 147
140 -### Troubleshooting 148 +## Troubleshooting
  149 +
141 The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following commands can be run in the rails console to look for 'bad' data. 150 The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following commands can be run in the rails console to look for 'bad' data.
142 151
143 -All project owners should have an owner 152 +All project owners should have an owner:
  153 +
144 ``` 154 ```
145 Project.all.select { |project| project.owner.blank? } 155 Project.all.select { |project| project.owner.blank? }
146 ``` 156 ```
147 157
148 -Every user should have a namespace 158 +Every user should have a namespace:
  159 +
149 ``` 160 ```
150 User.all.select { |u| u.namespace.blank? } 161 User.all.select { |u| u.namespace.blank? }
151 ``` 162 ```
152 163
153 -Projects in the global namespace should not conflict with projects in the owner namespace 164 +Projects in the global namespace should not conflict with projects in the owner namespace:
  165 +
154 ``` 166 ```
155 Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? } 167 Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? }
156 ``` 168 ```
doc/update/5.2-to-5.3.md
1 # From 5.2 to 5.3 1 # From 5.2 to 5.3
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 5.3 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489. 5 GitLab 5.3 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
5 6
6 -### 0. Backup 7 +## 0. Backup
7 8
8 -It's useful to make a backup just in case things go south:  
9 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 9 +It's useful to make a backup just in case things go south (with MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version):
10 10
11 ```bash 11 ```bash
12 cd /home/git/gitlab 12 cd /home/git/gitlab
13 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 13 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
14 ``` 14 ```
15 15
16 -### 1. Stop server 16 +## 1. Stop server
17 17
18 sudo service gitlab stop 18 sudo service gitlab stop
19 19
20 -### 2. Get latest code 20 +## 2. Get latest code
21 21
22 ```bash 22 ```bash
23 cd /home/git/gitlab 23 cd /home/git/gitlab
@@ -25,7 +25,7 @@ sudo -u git -H git fetch @@ -25,7 +25,7 @@ sudo -u git -H git fetch
25 sudo -u git -H git checkout 5-3-stable 25 sudo -u git -H git checkout 5-3-stable
26 ``` 26 ```
27 27
28 -### 3. Install libs, migrations, etc. 28 +## 3. Install libs, migrations, etc.
29 29
30 ```bash 30 ```bash
31 cd /home/git/gitlab 31 cd /home/git/gitlab
@@ -41,12 +41,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production @@ -41,12 +41,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
41 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 41 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
42 ``` 42 ```
43 43
44 -### 4. Update config files 44 +## 4. Update config files
45 45
46 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-3-stable/config/gitlab.yml.example but with your settings.  
47 -* Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-3-stable/config/puma.rb.example but with your settings. 46 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-3-stable/config/gitlab.yml.example but with your settings.
  47 +- Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-3-stable/config/puma.rb.example but with your settings.
48 48
49 -### 5. Update Init script 49 +## 5. Update Init script
50 50
51 ```bash 51 ```bash
52 sudo rm /etc/init.d/gitlab 52 sudo rm /etc/init.d/gitlab
@@ -54,12 +54,12 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5 @@ -54,12 +54,12 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5
54 sudo chmod +x /etc/init.d/gitlab 54 sudo chmod +x /etc/init.d/gitlab
55 ``` 55 ```
56 56
57 -### 6. Start application 57 +## 6. Start application
58 58
59 sudo service gitlab start 59 sudo service gitlab start
60 sudo service nginx restart 60 sudo service nginx restart
61 61
62 -### 7. Check application status 62 +## 7. Check application status
63 63
64 Check if GitLab and its environment are configured correctly: 64 Check if GitLab and its environment are configured correctly:
65 65
@@ -74,8 +74,8 @@ If all items are green, then congratulations upgrade complete! @@ -74,8 +74,8 @@ If all items are green, then congratulations upgrade complete!
74 ## Things went south? Revert to previous version (5.2) 74 ## Things went south? Revert to previous version (5.2)
75 75
76 ### 1. Revert the code to the previous version 76 ### 1. Revert the code to the previous version
77 -Follow the [`upgrade guide from 5.1 to 5.2`](5.1-to-5.2.md), except for the database migration  
78 -(The backup is already migrated to the previous version) 77 +
  78 +Follow the [`upgrade guide from 5.1 to 5.2`](5.1-to-5.2.md), except for the database migration (the backup is already migrated to the previous version).
79 79
80 ### 2. Restore from the backup: 80 ### 2. Restore from the backup:
81 81
doc/update/5.3-to-5.4.md
1 # From 5.3 to 5.4 1 # From 5.3 to 5.4
2 2
3 -### 0. Backup 3 +## 0. Backup
4 4
5 -It's useful to make a backup just in case things go south:  
6 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 5 +It's useful to make a backup just in case things go south (with MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version):
7 6
8 ```bash 7 ```bash
9 cd /home/git/gitlab 8 cd /home/git/gitlab
10 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 9 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
11 ``` 10 ```
12 11
13 -### 1. Stop server 12 +## 1. Stop server
14 13
15 sudo service gitlab stop 14 sudo service gitlab stop
16 15
17 -### 2. Get latest code 16 +## 2. Get latest code
18 17
19 ```bash 18 ```bash
20 cd /home/git/gitlab 19 cd /home/git/gitlab
@@ -22,7 +21,7 @@ sudo -u git -H git fetch @@ -22,7 +21,7 @@ sudo -u git -H git fetch
22 sudo -u git -H git checkout 5-4-stable # Latest version of 5-4-stable addresses CVE-2013-4489 21 sudo -u git -H git checkout 5-4-stable # Latest version of 5-4-stable addresses CVE-2013-4489
23 ``` 22 ```
24 23
25 -### 3. Update gitlab-shell 24 +## 3. Update gitlab-shell
26 25
27 ```bash 26 ```bash
28 cd /home/git/gitlab-shell 27 cd /home/git/gitlab-shell
@@ -30,7 +29,7 @@ sudo -u git -H git fetch @@ -30,7 +29,7 @@ sudo -u git -H git fetch
30 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities 29 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
31 ``` 30 ```
32 31
33 -### 4. Install libs, migrations, etc. 32 +## 4. Install libs, migrations, etc.
34 33
35 ```bash 34 ```bash
36 cd /home/git/gitlab 35 cd /home/git/gitlab
@@ -46,12 +45,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production @@ -46,12 +45,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
46 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 45 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
47 ``` 46 ```
48 47
49 -### 5. Update config files 48 +## 5. Update config files
50 49
51 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/gitlab.yml.example but with your settings.  
52 -* Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/puma.rb.example but with your settings. 50 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/gitlab.yml.example but with your settings.
  51 +- Make `/home/git/gitlab/config/puma.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/5-4-stable/config/puma.rb.example but with your settings.
53 52
54 -### 6. Update Init script 53 +## 6. Update Init script
55 54
56 ```bash 55 ```bash
57 sudo rm /etc/init.d/gitlab 56 sudo rm /etc/init.d/gitlab
@@ -59,12 +58,12 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5 @@ -59,12 +58,12 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5
59 sudo chmod +x /etc/init.d/gitlab 58 sudo chmod +x /etc/init.d/gitlab
60 ``` 59 ```
61 60
62 -### 7. Start application 61 +## 7. Start application
63 62
64 sudo service gitlab start 63 sudo service gitlab start
65 sudo service nginx restart 64 sudo service nginx restart
66 65
67 -### 8. Check application status 66 +## 8. Check application status
68 67
69 Check if GitLab and its environment are configured correctly: 68 Check if GitLab and its environment are configured correctly:
70 69
@@ -79,8 +78,8 @@ If all items are green, then congratulations upgrade complete! @@ -79,8 +78,8 @@ If all items are green, then congratulations upgrade complete!
79 ## Things went south? Revert to previous version (5.3) 78 ## Things went south? Revert to previous version (5.3)
80 79
81 ### 1. Revert the code to the previous version 80 ### 1. Revert the code to the previous version
82 -Follow the [`upgrade guide from 5.2 to 5.3`](5.2-to-5.3.md), except for the database migration  
83 -(The backup is already migrated to the previous version) 81 +
  82 +Follow the [`upgrade guide from 5.2 to 5.3`](5.2-to-5.3.md), except for the database migration (the backup is already migrated to the previous version).
84 83
85 ### 2. Restore from the backup: 84 ### 2. Restore from the backup:
86 85
doc/update/5.4-to-6.0.md
1 # From 5.4 to 6.0 1 # From 5.4 to 6.0
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489. 5 GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
5 6
6 -### Deprecations 7 +## Deprecations
7 8
8 -#### Global projects 9 +### Global projects
9 10
10 The root (global) namespace for projects is deprecated. 11 The root (global) namespace for projects is deprecated.
  12 +
11 So you need to move all your global projects under groups or users manually before update or they will be automatically moved to the project owner namespace during the update. When a project is moved all its members will receive an email with instructions how to update their git remote url. Please make sure you disable sending email when you do a test of the upgrade. 13 So you need to move all your global projects under groups or users manually before update or they will be automatically moved to the project owner namespace during the update. When a project is moved all its members will receive an email with instructions how to update their git remote url. Please make sure you disable sending email when you do a test of the upgrade.
12 14
13 -#### Teams 15 +### Teams
14 16
15 We introduce group membership in 6.0 as a replacement for teams. 17 We introduce group membership in 6.0 as a replacement for teams.
  18 +
16 The old combination of groups and teams was confusing for a lot of people. 19 The old combination of groups and teams was confusing for a lot of people.
  20 +
17 And when the members of a team where changed this wasn't reflected in the project permissions. 21 And when the members of a team where changed this wasn't reflected in the project permissions.
  22 +
18 In GitLab 6.0 you will be able to add members to a group with a permission level for each member. 23 In GitLab 6.0 you will be able to add members to a group with a permission level for each member.
  24 +
19 These group members will have access to the projects in that group. 25 These group members will have access to the projects in that group.
  26 +
20 Any changes to group members will immediately be reflected in the project permissions. 27 Any changes to group members will immediately be reflected in the project permissions.
  28 +
21 You can even have multiple owners for a group, greatly simplifying administration. 29 You can even have multiple owners for a group, greatly simplifying administration.
22 30
23 -### 0. Backup 31 +## 0. Backup
24 32
25 -It's useful to make a backup just in case things go south:  
26 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 33 +It's useful to make a backup just in case things go south (with MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version):
27 34
28 ```bash 35 ```bash
29 cd /home/git/gitlab 36 cd /home/git/gitlab
30 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 37 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
31 ``` 38 ```
32 39
33 -### 1. Stop server 40 +## 1. Stop server
34 41
35 sudo service gitlab stop 42 sudo service gitlab stop
36 43
37 -### 2. Get latest code 44 +## 2. Get latest code
38 45
39 ```bash 46 ```bash
40 cd /home/git/gitlab 47 cd /home/git/gitlab
@@ -42,7 +49,7 @@ sudo -u git -H git fetch @@ -42,7 +49,7 @@ sudo -u git -H git fetch
42 sudo -u git -H git checkout 6-0-stable 49 sudo -u git -H git checkout 6-0-stable
43 ``` 50 ```
44 51
45 -### 3. Update gitlab-shell 52 +## 3. Update gitlab-shell
46 53
47 ```bash 54 ```bash
48 cd /home/git/gitlab-shell 55 cd /home/git/gitlab-shell
@@ -50,14 +57,14 @@ sudo -u git -H git fetch @@ -50,14 +57,14 @@ sudo -u git -H git fetch
50 sudo -u git -H git checkout v1.7.9 57 sudo -u git -H git checkout v1.7.9
51 ``` 58 ```
52 59
53 -### 4. Install additional packages 60 +## 4. Install additional packages
54 61
55 ```bash 62 ```bash
56 # For reStructuredText markup language support install required package: 63 # For reStructuredText markup language support install required package:
57 sudo apt-get install python-docutils 64 sudo apt-get install python-docutils
58 ``` 65 ```
59 66
60 -### 5. Install libs, migrations, etc. 67 +## 5. Install libs, migrations, etc.
61 68
62 ```bash 69 ```bash
63 cd /home/git/gitlab 70 cd /home/git/gitlab
@@ -83,14 +90,14 @@ sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production @@ -83,14 +90,14 @@ sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
83 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production 90 sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
84 ``` 91 ```
85 92
86 -### 6. Update config files 93 +## 6. Update config files
87 94
88 Note: We switched from Puma in GitLab 5.4 to unicorn in GitLab 6.0. 95 Note: We switched from Puma in GitLab 5.4 to unicorn in GitLab 6.0.
89 96
90 -* Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example but with your settings.  
91 -* Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/unicorn.rb.example but with your settings. 97 +- Make `/home/git/gitlab/config/gitlab.yml` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/gitlab.yml.example but with your settings.
  98 +- Make `/home/git/gitlab/config/unicorn.rb` the same as https://gitlab.com/gitlab-org/gitlab-ce/blob/master/config/unicorn.rb.example but with your settings.
92 99
93 -### 7. Update Init script 100 +## 7. Update Init script
94 101
95 ```bash 102 ```bash
96 sudo rm /etc/init.d/gitlab 103 sudo rm /etc/init.d/gitlab
@@ -98,12 +105,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab @@ -98,12 +105,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
98 sudo chmod +x /etc/init.d/gitlab 105 sudo chmod +x /etc/init.d/gitlab
99 ``` 106 ```
100 107
101 -### 8. Start application 108 +## 8. Start application
102 109
103 sudo service gitlab start 110 sudo service gitlab start
104 sudo service nginx restart 111 sudo service nginx restart
105 112
106 -### 9. Check application status 113 +## 9. Check application status
107 114
108 Check if GitLab and its environment are configured correctly: 115 Check if GitLab and its environment are configured correctly:
109 116
@@ -115,20 +122,24 @@ To make sure you didn&#39;t miss anything run a more thorough check with: @@ -115,20 +122,24 @@ To make sure you didn&#39;t miss anything run a more thorough check with:
115 122
116 If all items are green, then congratulations upgrade complete! 123 If all items are green, then congratulations upgrade complete!
117 124
118 -### Troubleshooting 125 +## Troubleshooting
  126 +
119 The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following commands can be run in the rails console to look for 'bad' data. 127 The migrations in this update are very sensitive to incomplete or inconsistent data. If you have a long-running GitLab installation and some of the previous upgrades did not work out 100% correct this may bite you now. The following commands can be run in the rails console to look for 'bad' data.
120 128
121 -All project owners should have an owner 129 +All project owners should have an owner:
  130 +
122 ``` 131 ```
123 Project.all.select { |project| project.owner.blank? } 132 Project.all.select { |project| project.owner.blank? }
124 ``` 133 ```
125 134
126 -Every user should have a namespace 135 +Every user should have a namespace:
  136 +
127 ``` 137 ```
128 User.all.select { |u| u.namespace.blank? } 138 User.all.select { |u| u.namespace.blank? }
129 ``` 139 ```
130 140
131 -Projects in the global namespace should not conflict with projects in the owner namespace 141 +Projects in the global namespace should not conflict with projects in the owner namespace:
  142 +
132 ``` 143 ```
133 Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? } 144 Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? }
134 ``` 145 ```
doc/update/6.0-to-6.1.md
1 # From 6.0 to 6.1 1 # From 6.0 to 6.1
2 2
3 ## Warning 3 ## Warning
  4 +
4 GitLab 6.1 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489. 5 GitLab 6.1 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
5 6
6 -# In 6.1 we remove a lot of deprecated code.  
7 -# You should update to 6.0 before installing 6.1 so all the necessary conversions are run. 7 +**In 6.1 we remove a lot of deprecated code.**
  8 +
  9 +**You should update to 6.0 before installing 6.1 so all the necessary conversions are run.**
8 10
9 -### Deprecations 11 +## Deprecations
10 12
11 -#### Global issue numbers 13 +### Global issue numbers
12 14
13 -In 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their url. If you use an old issue number url and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. 15 +In 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects.
14 16
15 -### 0. Backup 17 +## 0. Backup
16 18
17 -It's useful to make a backup just in case things go south:  
18 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 19 +It's useful to make a backup just in case things go south (with MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version):
19 20
20 ```bash 21 ```bash
21 cd /home/git/gitlab 22 cd /home/git/gitlab
22 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 23 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
23 ``` 24 ```
24 25
25 -### 1. Stop server 26 +## 1. Stop server
26 27
27 sudo service gitlab stop 28 sudo service gitlab stop
28 29
29 -### 2. Get latest code 30 +## 2. Get latest code
30 31
31 ```bash 32 ```bash
32 cd /home/git/gitlab 33 cd /home/git/gitlab
@@ -35,7 +36,7 @@ sudo -u git -H git checkout 6-1-stable @@ -35,7 +36,7 @@ sudo -u git -H git checkout 6-1-stable
35 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-1-stable-ee 36 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-1-stable-ee
36 ``` 37 ```
37 38
38 -### 3. Update gitlab-shell 39 +## 3. Update gitlab-shell
39 40
40 ```bash 41 ```bash
41 cd /home/git/gitlab-shell 42 cd /home/git/gitlab-shell
@@ -43,7 +44,7 @@ sudo -u git -H git fetch @@ -43,7 +44,7 @@ sudo -u git -H git fetch
43 sudo -u git -H git checkout v1.7.9 44 sudo -u git -H git checkout v1.7.9
44 ``` 45 ```
45 46
46 -### 4. Install libs, migrations, etc. 47 +## 4. Install libs, migrations, etc.
47 48
48 ```bash 49 ```bash
49 cd /home/git/gitlab 50 cd /home/git/gitlab
@@ -62,12 +63,12 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production @@ -62,12 +63,12 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
62 sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production 63 sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
63 ``` 64 ```
64 65
65 -### 5. Update config files 66 +## 5. Update config files
66 67
67 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-1-stable/config/gitlab.yml.example but with your settings.  
68 -* Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-1-stable/config/unicorn.rb.example but with your settings. 68 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-1-stable/config/gitlab.yml.example but with your settings.
  69 +- Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-1-stable/config/unicorn.rb.example but with your settings.
69 70
70 -### 6. Update Init script 71 +## 6. Update Init script
71 72
72 ```bash 73 ```bash
73 sudo rm /etc/init.d/gitlab 74 sudo rm /etc/init.d/gitlab
@@ -75,12 +76,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab @@ -75,12 +76,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
75 sudo chmod +x /etc/init.d/gitlab 76 sudo chmod +x /etc/init.d/gitlab
76 ``` 77 ```
77 78
78 -### 7. Start application 79 +## 7. Start application
79 80
80 sudo service gitlab start 81 sudo service gitlab start
81 sudo service nginx restart 82 sudo service nginx restart
82 83
83 -### 8. Check application status 84 +## 8. Check application status
84 85
85 Check if GitLab and its environment are configured correctly: 86 Check if GitLab and its environment are configured correctly:
86 87
@@ -96,8 +97,8 @@ If all items are green, then congratulations upgrade complete! @@ -96,8 +97,8 @@ If all items are green, then congratulations upgrade complete!
96 ## Things went south? Revert to previous version (6.0) 97 ## Things went south? Revert to previous version (6.0)
97 98
98 ### 1. Revert the code to the previous version 99 ### 1. Revert the code to the previous version
99 -Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration  
100 -(The backup is already migrated to the previous version) 100 +
  101 +Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version).
101 102
102 ### 2. Restore from the backup: 103 ### 2. Restore from the backup:
103 104
doc/update/6.0-to-6.8.md
1 # From 6.0 to 6.8 1 # From 6.0 to 6.8
2 2
3 -# In 6.1 we remove a lot of deprecated code.  
4 -# You should update to 6.0 before installing 6.1 or higher so all the necessary conversions are run. 3 +**In 6.1 we remove a lot of deprecated code.**
5 4
6 -### Deprecations 5 +**You should update to 6.0 before installing 6.1 or higher so all the necessary conversions are run.**
7 6
8 -#### Global issue numbers 7 +## Deprecations
9 8
10 -As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their url. If you use an old issue number url and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects. 9 +## Global issue numbers
11 10
12 -### 0. Backup 11 +As of 6.1 issue numbers are project specific. This means all issues are renumbered and get a new number in their URL. If you use an old issue number URL and the issue number does not exist yet you are redirected to the new one. This conversion does not trigger if the old number already exists for this project, this is unlikely but will happen with old issues and large projects.
  12 +
  13 +## 0. Backup
13 14
14 It's useful to make a backup just in case things go south: 15 It's useful to make a backup just in case things go south:
15 (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 16 (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)
@@ -19,18 +20,18 @@ cd /home/git/gitlab @@ -19,18 +20,18 @@ cd /home/git/gitlab
19 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 20 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
20 ``` 21 ```
21 22
22 -### 1. Stop server 23 +## 1. Stop server
23 24
24 sudo service gitlab stop 25 sudo service gitlab stop
25 26
26 -### 2. Get latest code 27 +## 2. Get latest code
27 28
28 ```bash 29 ```bash
29 cd /home/git/gitlab 30 cd /home/git/gitlab
30 sudo -u git -H git fetch --all 31 sudo -u git -H git fetch --all
31 ``` 32 ```
32 33
33 -For Gitlab Community Edition: 34 +For GitLab Community Edition:
34 35
35 ```bash 36 ```bash
36 sudo -u git -H git checkout 6-8-stable 37 sudo -u git -H git checkout 6-8-stable
@@ -45,14 +46,14 @@ sudo -u git -H git checkout 6-8-stable-ee @@ -45,14 +46,14 @@ sudo -u git -H git checkout 6-8-stable-ee
45 ``` 46 ```
46 47
47 48
48 -### 3. Install additional packages 49 +## 3. Install additional packages
49 50
50 ```bash 51 ```bash
51 # Add support for lograte for better log file handling 52 # Add support for lograte for better log file handling
52 sudo apt-get install logrotate 53 sudo apt-get install logrotate
53 ``` 54 ```
54 55
55 -### 4. Update gitlab-shell 56 +## 4. Update gitlab-shell
56 57
57 ```bash 58 ```bash
58 cd /home/git/gitlab-shell 59 cd /home/git/gitlab-shell
@@ -60,7 +61,7 @@ sudo -u git -H git fetch @@ -60,7 +61,7 @@ sudo -u git -H git fetch
60 sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities 61 sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities
61 ``` 62 ```
62 63
63 -### 5. Install libs, migrations, etc. 64 +## 5. Install libs, migrations, etc.
64 65
65 ```bash 66 ```bash
66 cd /home/git/gitlab 67 cd /home/git/gitlab
@@ -85,7 +86,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS @@ -85,7 +86,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS
85 sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites 86 sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
86 ``` 87 ```
87 88
88 -### 6. Update config files 89 +## 6. Update config files
89 90
90 TIP: to see what changed in gitlab.yml.example in this release use next command: 91 TIP: to see what changed in gitlab.yml.example in this release use next command:
91 92
@@ -108,18 +109,18 @@ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers @@ -108,18 +109,18 @@ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers
108 sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab 109 sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
109 ``` 110 ```
110 111
111 -### 7. Update Init script 112 +## 7. Update Init script
112 113
113 ```bash 114 ```bash
114 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab 115 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
115 ``` 116 ```
116 117
117 -### 8. Start application 118 +## 8. Start application
118 119
119 sudo service gitlab start 120 sudo service gitlab start
120 sudo service nginx restart 121 sudo service nginx restart
121 122
122 -### 9. Check application status 123 +## 9. Check application status
123 124
124 Check if GitLab and its environment are configured correctly: 125 Check if GitLab and its environment are configured correctly:
125 126
@@ -135,8 +136,8 @@ If all items are green, then congratulations upgrade complete! @@ -135,8 +136,8 @@ If all items are green, then congratulations upgrade complete!
135 ## Things went south? Revert to previous version (6.0) 136 ## Things went south? Revert to previous version (6.0)
136 137
137 ### 1. Revert the code to the previous version 138 ### 1. Revert the code to the previous version
138 -Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration  
139 -(The backup is already migrated to the previous version) 139 +
  140 +Follow the [`upgrade guide from 5.4 to 6.0`](5.4-to-6.0.md), except for the database migration (the backup is already migrated to the previous version).
140 141
141 ### 2. Restore from the backup: 142 ### 2. Restore from the backup:
142 143
@@ -146,4 +147,5 @@ sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production @@ -146,4 +147,5 @@ sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
146 ``` 147 ```
147 148
148 ## Login issues after upgrade? 149 ## Login issues after upgrade?
149 -If running in https mode, be sure to read [Can't Verify csrf token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page) 150 +
  151 +If running in HTTPS mode, be sure to read [Can't Verify CSRF token authenticity](https://github.com/gitlabhq/gitlab-public-wiki/wiki/Trouble-Shooting-Guide#cant-verify-csrf-token-authenticitycant-get-past-login-pageredirected-to-login-page)
doc/update/6.1-to-6.2.md
1 # From 6.1 to 6.2 1 # From 6.1 to 6.2
2 2
3 -# You should update to 6.1 before installing 6.2 so all the necessary conversions are run. 3 +**You should update to 6.1 before installing 6.2 so all the necessary conversions are run.**
4 4
5 -### 0. Backup 5 +## 0. Backup
6 6
7 -It's useful to make a backup just in case things go south:  
8 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 7 +It's useful to make a backup just in case things go south: (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version).
9 8
10 ```bash 9 ```bash
11 cd /home/git/gitlab 10 cd /home/git/gitlab
12 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 11 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
13 ``` 12 ```
14 13
15 -### 1. Stop server 14 +## 1. Stop server
16 15
17 sudo service gitlab stop 16 sudo service gitlab stop
18 17
19 -### 2. Get latest code 18 +## 2. Get latest code
20 19
21 ```bash 20 ```bash
22 cd /home/git/gitlab 21 cd /home/git/gitlab
@@ -25,7 +24,7 @@ sudo -u git -H git checkout 6-2-stable # Latest version of 6-2-stable addresses @@ -25,7 +24,7 @@ sudo -u git -H git checkout 6-2-stable # Latest version of 6-2-stable addresses
25 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-2-stable-ee 24 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-2-stable-ee
26 ``` 25 ```
27 26
28 -### 3. Update gitlab-shell 27 +## 3. Update gitlab-shell
29 28
30 ```bash 29 ```bash
31 cd /home/git/gitlab-shell 30 cd /home/git/gitlab-shell
@@ -33,14 +32,14 @@ sudo -u git -H git fetch @@ -33,14 +32,14 @@ sudo -u git -H git fetch
33 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities 32 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
34 ``` 33 ```
35 34
36 -### 4. Install additional packages 35 +## 4. Install additional packages
37 36
38 ```bash 37 ```bash
39 # Add support for lograte for better log file handling 38 # Add support for lograte for better log file handling
40 sudo apt-get install logrotate 39 sudo apt-get install logrotate
41 ``` 40 ```
42 41
43 -### 5. Install libs, migrations, etc. 42 +## 5. Install libs, migrations, etc.
44 43
45 ```bash 44 ```bash
46 cd /home/git/gitlab 45 cd /home/git/gitlab
@@ -58,29 +57,33 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production @@ -58,29 +57,33 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
58 sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production 57 sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
59 ``` 58 ```
60 59
61 -### 6. Update config files 60 +## 6. Update config files
62 61
63 -TIP: to see what changed in gitlab.yml.example in this release use next command: 62 +TIP: to see what changed in `gitlab.yml.example` in this release use next command:
64 63
65 ``` 64 ```
66 git diff 6-1-stable:config/gitlab.yml.example 6-2-stable:config/gitlab.yml.example 65 git diff 6-1-stable:config/gitlab.yml.example 6-2-stable:config/gitlab.yml.example
67 ``` 66 ```
68 67
69 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-2-stable/config/gitlab.yml.example but with your settings.  
70 -* Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-2-stable/config/unicorn.rb.example but with your settings.  
71 -* Copy rack attack middleware config 68 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-2-stable/config/gitlab.yml.example but with your settings.
72 69
73 -```bash  
74 -sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb  
75 -```  
76 -* Uncomment `config.middleware.use Rack::Attack` in `/home/git/gitlab/config/application.rb`  
77 -* Set up logrotate 70 +- Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-2-stable/config/unicorn.rb.example but with your settings.
  71 +
  72 +- Copy rack attack middleware config:
  73 +
  74 + ```bash
  75 + sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
  76 + ```
  77 +
  78 +- Uncomment `config.middleware.use Rack::Attack` in `/home/git/gitlab/config/application.rb`
  79 +
  80 +- Set up logrotate.
78 81
79 ```bash 82 ```bash
80 sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab 83 sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
81 ``` 84 ```
82 85
83 -### 7. Update Init script 86 +## 7. Update Init script
84 87
85 ```bash 88 ```bash
86 sudo rm /etc/init.d/gitlab 89 sudo rm /etc/init.d/gitlab
@@ -88,12 +91,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab @@ -88,12 +91,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
88 sudo chmod +x /etc/init.d/gitlab 91 sudo chmod +x /etc/init.d/gitlab
89 ``` 92 ```
90 93
91 -### 8. Start application 94 +## 8. Start application
92 95
93 sudo service gitlab start 96 sudo service gitlab start
94 sudo service nginx restart 97 sudo service nginx restart
95 98
96 -### 9. Check application status 99 +## 9. Check application status
97 100
98 Check if GitLab and its environment are configured correctly: 101 Check if GitLab and its environment are configured correctly:
99 102
@@ -108,8 +111,8 @@ If all items are green, then congratulations upgrade complete! @@ -108,8 +111,8 @@ If all items are green, then congratulations upgrade complete!
108 ## Things went south? Revert to previous version (6.1) 111 ## Things went south? Revert to previous version (6.1)
109 112
110 ### 1. Revert the code to the previous version 113 ### 1. Revert the code to the previous version
111 -Follow the [`upgrade guide from 6.0 to 6.1`](6.0-to-6.1.md), except for the database migration  
112 -(The backup is already migrated to the previous version) 114 +
  115 +Follow the [`upgrade guide from 6.0 to 6.1`](6.0-to-6.1.md), except for the database migration (the backup is already migrated to the previous version).
113 116
114 ### 2. Restore from the backup: 117 ### 2. Restore from the backup:
115 118
doc/update/6.2-to-6.3.md
1 # From 6.2 to 6.3 1 # From 6.2 to 6.3
2 2
3 -## Requires version: 6.1 or 6.2 3 +**Requires version: 6.1 or 6.2.**
4 4
5 -### 0. Backup 5 +## 0. Backup
6 6
7 -It's useful to make a backup just in case things go south:  
8 -(With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version) 7 +It's useful to make a backup just in case things go south: (With MySQL, this may require granting "LOCK TABLES" privileges to the GitLab user on the database version)
9 8
10 ```bash 9 ```bash
11 cd /home/git/gitlab 10 cd /home/git/gitlab
12 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 11 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
13 ``` 12 ```
14 13
15 -### 1. Stop server 14 +## 1. Stop server
16 15
17 sudo service gitlab stop 16 sudo service gitlab stop
18 17
19 -### 2. Get latest code 18 +## 2. Get latest code
20 19
21 ```bash 20 ```bash
22 cd /home/git/gitlab 21 cd /home/git/gitlab
@@ -25,7 +24,7 @@ sudo -u git -H git checkout 6-3-stable @@ -25,7 +24,7 @@ sudo -u git -H git checkout 6-3-stable
25 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-3-stable-ee 24 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-3-stable-ee
26 ``` 25 ```
27 26
28 -### 3. Update gitlab-shell (and its config) 27 +## 3. Update gitlab-shell (and its config)
29 28
30 ```bash 29 ```bash
31 cd /home/git/gitlab-shell 30 cd /home/git/gitlab-shell
@@ -33,9 +32,9 @@ sudo -u git -H git fetch @@ -33,9 +32,9 @@ sudo -u git -H git fetch
33 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities 32 sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
34 ``` 33 ```
35 34
36 -The Gitlab-shell config changed recently, so check for config file changes and make `/home/git/gitlab-shell/config.yml` the same as https://github.com/gitlabhq/gitlab-shell/blob/master/config.yml.example 35 +The Gitlab-shell config changed recently, so check for config file changes and make `/home/git/gitlab-shell/config.yml` the same as <https://github.com/gitlabhq/gitlab-shell/blob/master/config.yml.example>
37 36
38 -### 4. Install libs, migrations, etc. 37 +## 4. Install libs, migrations, etc.
39 38
40 ```bash 39 ```bash
41 cd /home/git/gitlab 40 cd /home/git/gitlab
@@ -54,7 +53,7 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production @@ -54,7 +53,7 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
54 sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production 53 sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
55 ``` 54 ```
56 55
57 -### 5. Update config files 56 +## 5. Update config files
58 57
59 TIP: to see what changed in gitlab.yml.example in this release use next command: 58 TIP: to see what changed in gitlab.yml.example in this release use next command:
60 59
@@ -62,8 +61,8 @@ TIP: to see what changed in gitlab.yml.example in this release use next command: @@ -62,8 +61,8 @@ TIP: to see what changed in gitlab.yml.example in this release use next command:
62 git diff 6-2-stable:config/gitlab.yml.example 6-3-stable:config/gitlab.yml.example 61 git diff 6-2-stable:config/gitlab.yml.example 6-3-stable:config/gitlab.yml.example
63 ``` 62 ```
64 63
65 -* Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-3-stable/config/gitlab.yml.example but with your settings.  
66 -* Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-3-stable/config/unicorn.rb.example but with your settings. 64 +- Make `/home/git/gitlab/config/gitlab.yml` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-3-stable/config/gitlab.yml.example but with your settings.
  65 +- Make `/home/git/gitlab/config/unicorn.rb` same as https://gitlab.com/gitlab-org/gitlab-ce/blob/6-3-stable/config/unicorn.rb.example but with your settings.
67 66
68 ```bash 67 ```bash
69 # Copy rack attack middleware config 68 # Copy rack attack middleware config
@@ -71,19 +70,19 @@ cd /home/git/gitlab @@ -71,19 +70,19 @@ cd /home/git/gitlab
71 sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb 70 sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
72 ``` 71 ```
73 72
74 -### 6. Update Init script 73 +## 6. Update Init script
75 74
76 ```bash 75 ```bash
77 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab 76 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
78 sudo chmod +x /etc/init.d/gitlab 77 sudo chmod +x /etc/init.d/gitlab
79 ``` 78 ```
80 79
81 -### 7. Start application 80 +## 7. Start application
82 81
83 sudo service gitlab start 82 sudo service gitlab start
84 sudo service nginx restart 83 sudo service nginx restart
85 84
86 -### 8. Check application status 85 +## 8. Check application status
87 86
88 Check if GitLab and its environment are configured correctly: 87 Check if GitLab and its environment are configured correctly:
89 88
@@ -98,8 +97,8 @@ If all items are green, then congratulations upgrade complete! @@ -98,8 +97,8 @@ If all items are green, then congratulations upgrade complete!
98 ## Things went south? Revert to previous version (6.2) 97 ## Things went south? Revert to previous version (6.2)
99 98
100 ### 1. Revert the code to the previous version 99 ### 1. Revert the code to the previous version
101 -Follow the [`upgrade guide from 6.1 to 6.2`](6.1-to-6.2.md), except for the database migration  
102 -(The backup is already migrated to the previous version) 100 +
  101 +Follow the [`upgrade guide from 6.1 to 6.2`](6.1-to-6.2.md), except for the database migration (the backup is already migrated to the previous version).
103 102
104 ### 2. Restore from the backup: 103 ### 2. Restore from the backup:
105 104
doc/update/6.3-to-6.4.md
1 # From 6.3 to 6.4 1 # From 6.3 to 6.4
2 2
3 -### 0. Backup 3 +## 0. Backup
4 4
5 ```bash 5 ```bash
6 cd /home/git/gitlab 6 cd /home/git/gitlab
7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
8 ``` 8 ```
9 9
10 -### 1. Stop server 10 +## 1. Stop server
11 11
12 ```bash 12 ```bash
13 sudo service gitlab stop 13 sudo service gitlab stop
14 ```` 14 ````
15 15
16 -### 2. Get latest code 16 +## 2. Get latest code
17 17
18 ```bash 18 ```bash
19 cd /home/git/gitlab 19 cd /home/git/gitlab
@@ -22,7 +22,7 @@ sudo -u git -H git checkout 6-4-stable @@ -22,7 +22,7 @@ sudo -u git -H git checkout 6-4-stable
22 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-4-stable-ee 22 # For GitLab Enterprise Edition: sudo -u git -H git checkout 6-4-stable-ee
23 ``` 23 ```
24 24
25 -### 3. Update gitlab-shell (and its config) 25 +## 3. Update gitlab-shell (and its config)
26 26
27 ```bash 27 ```bash
28 cd /home/git/gitlab-shell 28 cd /home/git/gitlab-shell
@@ -30,7 +30,7 @@ sudo -u git -H git fetch @@ -30,7 +30,7 @@ sudo -u git -H git fetch
30 sudo -u git -H git checkout v1.8.0 30 sudo -u git -H git checkout v1.8.0
31 ``` 31 ```
32 32
33 -### 4. Install libs, migrations, etc. 33 +## 4. Install libs, migrations, etc.
34 34
35 ```bash 35 ```bash
36 cd /home/git/gitlab 36 cd /home/git/gitlab
@@ -52,14 +52,14 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS @@ -52,14 +52,14 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS
52 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab 52 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
53 ``` 53 ```
54 54
55 -### 5. Start application 55 +## 5. Start application
56 56
57 ```bash 57 ```bash
58 sudo service gitlab start 58 sudo service gitlab start
59 sudo service nginx restart 59 sudo service nginx restart
60 ``` 60 ```
61 61
62 -### 6. Check application status 62 +## 6. Check application status
63 63
64 Check if GitLab and its environment are configured correctly: 64 Check if GitLab and its environment are configured correctly:
65 65
@@ -78,8 +78,8 @@ If all items are green, then congratulations upgrade complete! @@ -78,8 +78,8 @@ If all items are green, then congratulations upgrade complete!
78 ## Things went south? Revert to previous version (6.3) 78 ## Things went south? Revert to previous version (6.3)
79 79
80 ### 1. Revert the code to the previous version 80 ### 1. Revert the code to the previous version
81 -Follow the [`upgrade guide from 6.2 to 6.3`](6.2-to-6.3.md), except for the database migration  
82 -(The backup is already migrated to the previous version) 81 +
  82 +Follow the [`upgrade guide from 6.2 to 6.3`](6.2-to-6.3.md), except for the database migration (the backup is already migrated to the previous version).
83 83
84 ### 2. Restore from the backup: 84 ### 2. Restore from the backup:
85 85
doc/update/6.4-to-6.5.md
1 # From 6.4 to 6.5 1 # From 6.4 to 6.5
2 2
3 -### 0. Backup 3 +## 0. Backup
4 4
5 ```bash 5 ```bash
6 cd /home/git/gitlab 6 cd /home/git/gitlab
7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
8 ``` 8 ```
9 9
10 -### 1. Stop server 10 +## 1. Stop server
11 11
12 sudo service gitlab stop 12 sudo service gitlab stop
13 13
14 -### 2. Get latest code 14 +## 2. Get latest code
15 15
16 ```bash 16 ```bash
17 cd /home/git/gitlab 17 cd /home/git/gitlab
18 sudo -u git -H git fetch --all 18 sudo -u git -H git fetch --all
19 ``` 19 ```
20 20
21 -For Gitlab Community Edition: 21 +For GitLab Community Edition:
22 22
23 ```bash 23 ```bash
24 sudo -u git -H git checkout 6-5-stable 24 sudo -u git -H git checkout 6-5-stable
@@ -32,7 +32,7 @@ For GitLab Enterprise Edition: @@ -32,7 +32,7 @@ For GitLab Enterprise Edition:
32 sudo -u git -H git checkout 6-5-stable-ee 32 sudo -u git -H git checkout 6-5-stable-ee
33 ``` 33 ```
34 34
35 -### 3. Update gitlab-shell (and its config) 35 +## 3. Update gitlab-shell (and its config)
36 36
37 ```bash 37 ```bash
38 cd /home/git/gitlab-shell 38 cd /home/git/gitlab-shell
@@ -40,7 +40,7 @@ sudo -u git -H git fetch @@ -40,7 +40,7 @@ sudo -u git -H git fetch
40 sudo -u git -H git checkout v1.8.0 40 sudo -u git -H git checkout v1.8.0
41 ``` 41 ```
42 42
43 -### 4. Install libs, migrations, etc. 43 +## 4. Install libs, migrations, etc.
44 44
45 ```bash 45 ```bash
46 cd /home/git/gitlab 46 cd /home/git/gitlab
@@ -62,12 +62,12 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS @@ -62,12 +62,12 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS
62 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab 62 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
63 ``` 63 ```
64 64
65 -### 5. Start application 65 +## 5. Start application
66 66
67 sudo service gitlab start 67 sudo service gitlab start
68 sudo service nginx restart 68 sudo service nginx restart
69 69
70 -### 6. Check application status 70 +## 6. Check application status
71 71
72 Check if GitLab and its environment are configured correctly: 72 Check if GitLab and its environment are configured correctly:
73 73
@@ -82,13 +82,14 @@ If all items are green, then congratulations upgrade is complete! @@ -82,13 +82,14 @@ If all items are green, then congratulations upgrade is complete!
82 ## Things went south? Revert to previous version (6.4) 82 ## Things went south? Revert to previous version (6.4)
83 83
84 ### 1. Revert the code to the previous version 84 ### 1. Revert the code to the previous version
85 -Follow the [`upgrade guide from 6.3 to 6.4`](6.3-to-6.4.md), except for the database migration  
86 -(The backup is already migrated to the previous version)  
87 85
88 -### 2. Restore from the backup: 86 +Follow the [`upgrade guide from 6.3 to 6.4`](6.3-to-6.4.md), except for the database migration (the backup is already migrated to the previous version).
  87 +
  88 +### 2. Restore from the backup
89 89
90 ```bash 90 ```bash
91 cd /home/git/gitlab 91 cd /home/git/gitlab
92 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production 92 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
93 ``` 93 ```
  94 +
94 If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. 95 If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above.
doc/update/6.5-to-6.6.md
1 # From 6.5 to 6.6 1 # From 6.5 to 6.6
2 2
3 -### 0. Backup 3 +## 0. Backup
4 4
5 ```bash 5 ```bash
6 cd /home/git/gitlab 6 cd /home/git/gitlab
7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
8 ``` 8 ```
9 9
10 -### 1. Stop server 10 +## 1. Stop server
11 11
12 sudo service gitlab stop 12 sudo service gitlab stop
13 13
14 -### 2. Get latest code 14 +## 2. Get latest code
15 15
16 ```bash 16 ```bash
17 cd /home/git/gitlab 17 cd /home/git/gitlab
18 sudo -u git -H git fetch --all 18 sudo -u git -H git fetch --all
19 ``` 19 ```
20 20
21 -For Gitlab Community Edition: 21 +For GitLab Community Edition:
22 22
23 ```bash 23 ```bash
24 sudo -u git -H git checkout 6-6-stable 24 sudo -u git -H git checkout 6-6-stable
@@ -32,7 +32,7 @@ For GitLab Enterprise Edition: @@ -32,7 +32,7 @@ For GitLab Enterprise Edition:
32 sudo -u git -H git checkout 6-6-stable-ee 32 sudo -u git -H git checkout 6-6-stable-ee
33 ``` 33 ```
34 34
35 -### 3. Update gitlab-shell (and its config) 35 +## 3. Update gitlab-shell (and its config)
36 36
37 ```bash 37 ```bash
38 cd /home/git/gitlab-shell 38 cd /home/git/gitlab-shell
@@ -40,7 +40,7 @@ sudo -u git -H git fetch @@ -40,7 +40,7 @@ sudo -u git -H git fetch
40 sudo -u git -H git checkout v1.8.0 40 sudo -u git -H git checkout v1.8.0
41 ``` 41 ```
42 42
43 -### 4. Install libs, migrations, etc. 43 +## 4. Install libs, migrations, etc.
44 44
45 ```bash 45 ```bash
46 cd /home/git/gitlab 46 cd /home/git/gitlab
@@ -62,12 +62,12 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS @@ -62,12 +62,12 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS
62 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab 62 sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
63 ``` 63 ```
64 64
65 -### 5. Start application 65 +## 5. Start application
66 66
67 sudo service gitlab start 67 sudo service gitlab start
68 sudo service nginx restart 68 sudo service nginx restart
69 69
70 -### 6. Check application status 70 +## 6. Check application status
71 71
72 Check if GitLab and its environment are configured correctly: 72 Check if GitLab and its environment are configured correctly:
73 73
@@ -82,6 +82,7 @@ If all items are green, then congratulations upgrade is complete! @@ -82,6 +82,7 @@ If all items are green, then congratulations upgrade is complete!
82 ## Things went south? Revert to previous version (6.5) 82 ## Things went south? Revert to previous version (6.5)
83 83
84 ### 1. Revert the code to the previous version 84 ### 1. Revert the code to the previous version
  85 +
85 Follow the [`upgrade guide from 6.4 to 6.5`](6.4-to-6.5.md), except for the database migration 86 Follow the [`upgrade guide from 6.4 to 6.5`](6.4-to-6.5.md), except for the database migration
86 (The backup is already migrated to the previous version) 87 (The backup is already migrated to the previous version)
87 88
@@ -91,4 +92,5 @@ Follow the [`upgrade guide from 6.4 to 6.5`](6.4-to-6.5.md), except for the data @@ -91,4 +92,5 @@ Follow the [`upgrade guide from 6.4 to 6.5`](6.4-to-6.5.md), except for the data
91 cd /home/git/gitlab 92 cd /home/git/gitlab
92 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production 93 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
93 ``` 94 ```
  95 +
94 If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. 96 If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above.
doc/update/6.6-to-6.7.md
1 # From 6.6 to 6.7 1 # From 6.6 to 6.7
2 2
3 -### 0. Backup 3 +## 0. Backup
4 4
5 ```bash 5 ```bash
6 cd /home/git/gitlab 6 cd /home/git/gitlab
7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
8 ``` 8 ```
9 9
10 -### 1. Stop server 10 +## 1. Stop server
11 11
12 sudo service gitlab stop 12 sudo service gitlab stop
13 13
14 -### 2. Get latest code 14 +## 2. Get latest code
15 15
16 ```bash 16 ```bash
17 cd /home/git/gitlab 17 cd /home/git/gitlab
@@ -32,7 +32,7 @@ For GitLab Enterprise Edition: @@ -32,7 +32,7 @@ For GitLab Enterprise Edition:
32 sudo -u git -H git checkout 6-7-stable-ee 32 sudo -u git -H git checkout 6-7-stable-ee
33 ``` 33 ```
34 34
35 -### 3. Update gitlab-shell (and its config) 35 +## 3. Update gitlab-shell (and its config)
36 36
37 ```bash 37 ```bash
38 cd /home/git/gitlab-shell 38 cd /home/git/gitlab-shell
@@ -40,7 +40,7 @@ sudo -u git -H git fetch @@ -40,7 +40,7 @@ sudo -u git -H git fetch
40 sudo -u git -H git checkout v1.9.1 40 sudo -u git -H git checkout v1.9.1
41 ``` 41 ```
42 42
43 -### 4. Install libs, migrations, etc. 43 +## 4. Install libs, migrations, etc.
44 44
45 ```bash 45 ```bash
46 cd /home/git/gitlab 46 cd /home/git/gitlab
@@ -72,13 +72,12 @@ sudo -u git -H gzip /home/git/gitlab-shell/gitlab-shell.log.1 @@ -72,13 +72,12 @@ sudo -u git -H gzip /home/git/gitlab-shell/gitlab-shell.log.1
72 sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites 72 sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
73 ``` 73 ```
74 74
75 -  
76 -### 5. Start application 75 +## 5. Start application
77 76
78 sudo service gitlab start 77 sudo service gitlab start
79 sudo service nginx restart 78 sudo service nginx restart
80 79
81 -### 6. Check application status 80 +## 6. Check application status
82 81
83 Check if GitLab and its environment are configured correctly: 82 Check if GitLab and its environment are configured correctly:
84 83
@@ -93,13 +92,14 @@ If all items are green, then congratulations upgrade is complete! @@ -93,13 +92,14 @@ If all items are green, then congratulations upgrade is complete!
93 ## Things went south? Revert to previous version (6.6) 92 ## Things went south? Revert to previous version (6.6)
94 93
95 ### 1. Revert the code to the previous version 94 ### 1. Revert the code to the previous version
96 -Follow the [`upgrade guide from 6.5 to 6.6`](6.5-to-6.6.md), except for the database migration  
97 -(The backup is already migrated to the previous version)  
98 95
99 -### 2. Restore from the backup: 96 +Follow the [`upgrade guide from 6.5 to 6.6`](6.5-to-6.6.md), except for the database migration (the backup is already migrated to the previous version).
  97 +
  98 +### 2. Restore from the backup
100 99
101 ```bash 100 ```bash
102 cd /home/git/gitlab 101 cd /home/git/gitlab
103 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production 102 sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
104 ``` 103 ```
  104 +
105 If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above. 105 If you have more than one backup *.tar file(s) please add `BACKUP=timestamp_of_backup` to the command above.
doc/update/6.7-to-6.8.md
1 # From 6.7 to 6.8 1 # From 6.7 to 6.8
2 2
3 -### 0. Backup 3 +## 0. Backup
4 4
5 ```bash 5 ```bash
6 cd /home/git/gitlab 6 cd /home/git/gitlab
7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 7 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
8 ``` 8 ```
9 9
10 -### 1. Stop server 10 +## 1. Stop server
11 11
12 ```bash 12 ```bash
13 sudo service gitlab stop 13 sudo service gitlab stop
14 ``` 14 ```
15 15
16 -### 2. Get latest code 16 +## 2. Get latest code
17 17
18 ```bash 18 ```bash
19 cd /home/git/gitlab 19 cd /home/git/gitlab
20 sudo -u git -H git fetch --all 20 sudo -u git -H git fetch --all
21 ``` 21 ```
22 22
23 -For Gitlab Community Edition: 23 +For GitLab Community Edition:
24 24
25 ```bash 25 ```bash
26 sudo -u git -H git checkout 6-8-stable 26 sudo -u git -H git checkout 6-8-stable
@@ -34,7 +34,7 @@ For GitLab Enterprise Edition: @@ -34,7 +34,7 @@ For GitLab Enterprise Edition:
34 sudo -u git -H git checkout 6-8-stable-ee 34 sudo -u git -H git checkout 6-8-stable-ee
35 ``` 35 ```
36 36
37 -### 3. Update gitlab-shell (and its config) 37 +## 3. Update gitlab-shell (and its config)
38 38
39 ```bash 39 ```bash
40 cd /home/git/gitlab-shell 40 cd /home/git/gitlab-shell
@@ -42,7 +42,7 @@ sudo -u git -H git fetch @@ -42,7 +42,7 @@ sudo -u git -H git fetch
42 sudo -u git -H git checkout v1.9.3 42 sudo -u git -H git checkout v1.9.3
43 ``` 43 ```
44 44
45 -### 4. Install libs, migrations, etc. 45 +## 4. Install libs, migrations, etc.
46 46
47 ```bash 47 ```bash
48 cd /home/git/gitlab 48 cd /home/git/gitlab
@@ -68,9 +68,9 @@ sudo chmod +x /etc/init.d/gitlab @@ -68,9 +68,9 @@ sudo chmod +x /etc/init.d/gitlab
68 sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites 68 sudo chmod u+rwx,g=rx,o-rwx /home/git/gitlab-satellites
69 ``` 69 ```
70 70
71 -### 5. Update config files 71 +## 5. Update config files
72 72
73 -#### New configuration options for gitlab.yml 73 +### New configuration options for gitlab.yml
74 74
75 There are new configuration options available for gitlab.yml. View them with the command below and apply them to your current gitlab.yml if desired. 75 There are new configuration options available for gitlab.yml. View them with the command below and apply them to your current gitlab.yml if desired.
76 76
@@ -78,24 +78,24 @@ There are new configuration options available for gitlab.yml. View them with the @@ -78,24 +78,24 @@ There are new configuration options available for gitlab.yml. View them with the
78 git diff 6-7-stable:config/gitlab.yml.example 6-8-stable:config/gitlab.yml.example 78 git diff 6-7-stable:config/gitlab.yml.example 6-8-stable:config/gitlab.yml.example
79 ``` 79 ```
80 80
81 -#### MySQL? Remove reaping frequency 81 +### MySQL? Remove reaping frequency
82 82
83 If you are using MySQL as a database, remove `reaping_frequency` from you database.yml to prevent crashes. [Relevant commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/5163a8fcb9cfd63435560fda00173b76df2ccc93). 83 If you are using MySQL as a database, remove `reaping_frequency` from you database.yml to prevent crashes. [Relevant commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/5163a8fcb9cfd63435560fda00173b76df2ccc93).
84 84
85 -#### HTTPS? Disable gzip 85 +### HTTPS? Disable gzip
86 86
87 If you are using HTTPS, disable gzip as in [this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/563fec734912d81cd7caea6fa8ec2b397fb72a9b) to prevent BREACH attacks. 87 If you are using HTTPS, disable gzip as in [this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/563fec734912d81cd7caea6fa8ec2b397fb72a9b) to prevent BREACH attacks.
88 88
89 -#### Turn on asset compression 89 +### Turn on asset compression
90 90
91 To improve performance, enable gzip asset compression as seen [in this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/8af94ed75505f0253823b9b2d44320fecea5b5fb). 91 To improve performance, enable gzip asset compression as seen [in this commit](https://gitlab.com/gitlab-org/gitlab-ce/commit/8af94ed75505f0253823b9b2d44320fecea5b5fb).
92 92
93 -### 6. Start application 93 +## 6. Start application
94 94
95 sudo service gitlab start 95 sudo service gitlab start
96 sudo service nginx restart 96 sudo service nginx restart
97 97
98 -### 7. Check application status 98 +## 7. Check application status
99 99
100 Check if GitLab and its environment are configured correctly: 100 Check if GitLab and its environment are configured correctly:
101 101
@@ -110,10 +110,10 @@ If all items are green, then congratulations upgrade is complete! @@ -110,10 +110,10 @@ If all items are green, then congratulations upgrade is complete!
110 ## Things went south? Revert to previous version (6.7) 110 ## Things went south? Revert to previous version (6.7)
111 111
112 ### 1. Revert the code to the previous version 112 ### 1. Revert the code to the previous version
113 -Follow the [`upgrade guide from 6.6 to 6.7`](6.6-to-6.7.md), except for the database migration  
114 -(The backup is already migrated to the previous version)  
115 113
116 -### 2. Restore from the backup: 114 +Follow the [`upgrade guide from 6.6 to 6.7`](6.6-to-6.7.md), except for the database migration (the backup is already migrated to the previous version).
  115 +
  116 +### 2. Restore from the backup
117 117
118 ```bash 118 ```bash
119 cd /home/git/gitlab 119 cd /home/git/gitlab
doc/update/README.md
1 -+ [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update)  
2 -+ [Upgrader](upgrader.md)  
3 -+ [Ruby](ruby.md)  
4 -+ [Patch versions](patch_versions.md)  
5 -+ [MySQL to PostgreSQL](mysql_to_postgresql.md) 1 +- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update)
  2 +- [Upgrader](upgrader.md)
  3 +- [Ruby](ruby.md)
  4 +- [Patch versions](patch_versions.md)
  5 +- [MySQL to PostgreSQL](mysql_to_postgresql.md)
doc/update/mysql_to_postgresql.md
1 # Migrating GitLab from MySQL to Postgres 1 # Migrating GitLab from MySQL to Postgres
2 2
3 -If you are replacing MySQL with Postgres while keeping GitLab on the same  
4 -server all you need to do is to export from MySQL, import into Postgres and  
5 -rebuild the indexes as described below. If you are also moving GitLab to  
6 -another server, or if you are switching to omnibus-gitlab, you may want to use  
7 -a GitLab backup file. The second part of this documents explains the procedure  
8 -to do this. 3 +If you are replacing MySQL with Postgres while keeping GitLab on the same server all you need to do is to export from MySQL, import into Postgres and rebuild the indexes as described below. If you are also moving GitLab to another server, or if you are switching to omnibus-gitlab, you may want to use a GitLab backup file. The second part of this documents explains the procedure to do this.
9 4
10 ## Export from MySQL and import into Postgres 5 ## Export from MySQL and import into Postgres
11 6
@@ -27,18 +22,13 @@ psql -f databasename.psql -d gitlabhq_production @@ -27,18 +22,13 @@ psql -f databasename.psql -d gitlabhq_production
27 sudo service gitlab start 22 sudo service gitlab start
28 ``` 23 ```
29 24
30 -  
31 ## Rebuild indexes 25 ## Rebuild indexes
32 26
33 -The lanyrd database converter script does not preserve all indexes, so we have  
34 -to recreate them ourselves after migrating from MySQL. It is not necessary to  
35 -shut down GitLab for this process.  
36 - 27 +The lanyrd database converter script does not preserve all indexes, so we have to recreate them ourselves after migrating from MySQL. It is not necessary to shut down GitLab for this process.
37 28
38 ### For non-omnibus installations 29 ### For non-omnibus installations
39 30
40 -On non-omnibus installations (distributed using Git) we retrieve the index  
41 -declarations from version control using `git stash`. 31 +On non-omnibus installations (distributed using Git) we retrieve the index declarations from version control using `git stash`.
42 32
43 ``` 33 ```
44 # Clone the database converter on your Postgres-backed GitLab server 34 # Clone the database converter on your Postgres-backed GitLab server
@@ -59,8 +49,7 @@ sudo -u git -H bundle exec rails runner -e production &#39;eval $stdin.read&#39; &lt; /tmp/ @@ -59,8 +49,7 @@ sudo -u git -H bundle exec rails runner -e production &#39;eval $stdin.read&#39; &lt; /tmp/
59 49
60 ### For omnibus-gitlab installations 50 ### For omnibus-gitlab installations
61 51
62 -On omnibus-gitlab we need to get the index declarations from a file called  
63 -`schema.rb.bundled`. For versions older than 6.9, we need to download the file. 52 +On omnibus-gitlab we need to get the index declarations from a file called `schema.rb.bundled`. For versions older than 6.9, we need to download the file.
64 53
65 ``` 54 ```
66 # Clone the database converter on your Postgres-backed GitLab server 55 # Clone the database converter on your Postgres-backed GitLab server
@@ -80,10 +69,7 @@ test -e /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb.bundled || sudo / @@ -80,10 +69,7 @@ test -e /opt/gitlab/embedded/service/gitlab-rails/db/schema.rb.bundled || sudo /
80 69
81 ## Converting a GitLab backup file from MySQL to Postgres 70 ## Converting a GitLab backup file from MySQL to Postgres
82 71
83 -GitLab backup files (<timestamp>_gitlab_backup.tar) contain a SQL dump. Using  
84 -the lanyrd database converter we can replace a MySQL database dump inside the  
85 -tar file with a Postgres database dump. This can be useful if you are moving to  
86 -another server. 72 +GitLab backup files (<timestamp>_gitlab_backup.tar) contain a SQL dump. Using the lanyrd database converter we can replace a MySQL database dump inside the tar file with a Postgres database dump. This can be useful if you are moving to another server.
87 73
88 ``` 74 ```
89 # Stop GitLab 75 # Stop GitLab
doc/update/patch_versions.md
1 -# Universal update guide for patch versions. For example from 6.2.0 to 6.2.1, also see the [semantic versioning specification](http://semver.org/). 1 +# Universal update guide for patch versions
  2 +
  3 +For example from 6.2.0 to 6.2.1, also see the [semantic versioning specification](http://semver.org/).
2 4
3 ### 0. Backup 5 ### 0. Backup
4 6
doc/update/ruby.md
@@ -2,28 +2,31 @@ @@ -2,28 +2,31 @@
2 2
3 This guide explains how to update Ruby in case you installed it from source according to the [instructions](../install/installation.md#2-ruby). 3 This guide explains how to update Ruby in case you installed it from source according to the [instructions](../install/installation.md#2-ruby).
4 4
5 -### 1. Look for Ruby versions 5 +## 1. Look for Ruby versions
  6 +
6 This guide will only update `/usr/local/bin/ruby`. You can see which Ruby binaries are installed on your system by running: 7 This guide will only update `/usr/local/bin/ruby`. You can see which Ruby binaries are installed on your system by running:
7 8
8 ```bash 9 ```bash
9 ls -l $(which -a ruby) 10 ls -l $(which -a ruby)
10 ``` 11 ```
11 12
12 -### 2. Stop GitLab 13 +## 2. Stop GitLab
13 14
14 ```bash 15 ```bash
15 sudo service gitlab stop 16 sudo service gitlab stop
16 ``` 17 ```
17 18
18 -### 3. Install or update dependencies 19 +## 3. Install or update dependencies
  20 +
19 Here we are assuming you are using Debian/Ubuntu. 21 Here we are assuming you are using Debian/Ubuntu.
20 22
21 ```bash 23 ```bash
22 sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl 24 sudo apt-get install build-essential zlib1g-dev libyaml-dev libssl-dev libgdbm-dev libreadline-dev libncurses5-dev libffi-dev curl
23 ``` 25 ```
24 26
25 -### 4. Download, compile and install Ruby  
26 -Find the latest stable version of Ruby 1.9 or 2.0 at https://www.ruby-lang.org/en/downloads/ . We recommend at least 2.0.0-p353, which is patched against [CVE-2013-4164](https://www.ruby-lang.org/en/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/). 27 +## 4. Download, compile and install Ruby
  28 +
  29 +Find the latest stable version of Ruby 1.9 or 2.0 at <https://www.ruby-lang.org/en/downloads/>. We recommend at least 2.0.0-p353, which is patched against [CVE-2013-4164](https://www.ruby-lang.org/en/news/2013/11/22/heap-overflow-in-floating-point-parsing-cve-2013-4164/).
27 30
28 ```bash 31 ```bash
29 cd /tmp 32 cd /tmp
@@ -36,6 +39,7 @@ sudo gem install bundler @@ -36,6 +39,7 @@ sudo gem install bundler
36 ``` 39 ```
37 40
38 ### 5. Reinstall GitLab gem bundle 41 ### 5. Reinstall GitLab gem bundle
  42 +
39 Just to be sure we will reinstall the gems used by GitLab. Note that the `bundle install` command [depends on your choice of database](../install/installation.md#install-gems). 43 Just to be sure we will reinstall the gems used by GitLab. Note that the `bundle install` command [depends on your choice of database](../install/installation.md#install-gems).
40 44
41 ```bash 45 ```bash
@@ -44,11 +48,12 @@ sudo -u git -H rm -rf vendor/bundle # remove existing Gem bundle @@ -44,11 +48,12 @@ sudo -u git -H rm -rf vendor/bundle # remove existing Gem bundle
44 sudo -u git -H bundle install --deployment --without development test mysql aws # Assuming PostgreSQL 48 sudo -u git -H bundle install --deployment --without development test mysql aws # Assuming PostgreSQL
45 ``` 49 ```
46 50
47 -### 6. Start GitLab 51 +## 6. Start GitLab
  52 +
48 We are now ready to restart GitLab. 53 We are now ready to restart GitLab.
49 54
50 ```bash 55 ```bash
51 sudo service gitlab start 56 sudo service gitlab start
52 ``` 57 ```
53 58
54 -### Done 59 +## Done
doc/update/upgrader.md
1 -# GitLab Upgrader 1 +# GitLab Upgrader
2 2
3 GitLab Upgrader - a ruby script that allows you easily upgrade GitLab to latest minor version. 3 GitLab Upgrader - a ruby script that allows you easily upgrade GitLab to latest minor version.
  4 +
4 For example it can update your application from 6.4 to latest GitLab 6 version (like 6.6.1). 5 For example it can update your application from 6.4 to latest GitLab 6 version (like 6.6.1).
5 -You still need to create a a backup and manually restart GitLab after runnning the script but all other operations are done by this upgrade script. 6 +
  7 +You still need to create a backup and manually restart GitLab after running the script but all other operations are done by this upgrade script.
  8 +
6 If you have local changes to your GitLab repository the script will stash them and you need to use `git stash pop` after running the script. 9 If you have local changes to your GitLab repository the script will stash them and you need to use `git stash pop` after running the script.
7 10
8 -__GitLab Upgrader is available only for GitLab version 6.4.2 or higher__ 11 +**GitLab Upgrader is available only for GitLab version 6.4.2 or higher.**
9 12
10 -### 0. Backup 13 +## 0. Backup
11 14
12 cd /home/git/gitlab 15 cd /home/git/gitlab
13 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production 16 sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
14 17
15 -### 1. Stop server 18 +## 1. Stop server
16 19
17 sudo service gitlab stop 20 sudo service gitlab stop
18 21
19 -### 2. Run gitlab upgrade tool 22 +## 2. Run GitLab upgrade tool
20 23
21 # Starting with GitLab version 7.0 upgrader script has been moved to bin directory 24 # Starting with GitLab version 7.0 upgrader script has been moved to bin directory
22 cd /home/git/gitlab 25 cd /home/git/gitlab
@@ -25,12 +28,12 @@ __GitLab Upgrader is available only for GitLab version 6.4.2 or higher__ @@ -25,12 +28,12 @@ __GitLab Upgrader is available only for GitLab version 6.4.2 or higher__
25 # to perform a non-interactive install (no user input required) you can add -y 28 # to perform a non-interactive install (no user input required) you can add -y
26 # if [ -f bin/upgrade.rb ]; then sudo -u git -H ruby bin/upgrade.rb -y; else sudo -u git -H ruby script/upgrade.rb -y; fi 29 # if [ -f bin/upgrade.rb ]; then sudo -u git -H ruby bin/upgrade.rb -y; else sudo -u git -H ruby script/upgrade.rb -y; fi
27 30
28 -### 3. Start application 31 +## 3. Start application
29 32
30 sudo service gitlab start 33 sudo service gitlab start
31 sudo service nginx restart 34 sudo service nginx restart
32 35
33 -### 4. Check application status 36 +## 4. Check application status
34 37
35 Check if GitLab and its dependencies are configured correctly: 38 Check if GitLab and its dependencies are configured correctly:
36 39
@@ -38,9 +41,10 @@ Check if GitLab and its dependencies are configured correctly: @@ -38,9 +41,10 @@ Check if GitLab and its dependencies are configured correctly:
38 41
39 If all items are green, then congratulations upgrade is complete! 42 If all items are green, then congratulations upgrade is complete!
40 43
41 -### 5. Upgrade GitLab Shell (if needed) 44 +## 5. Upgrade GitLab Shell (if needed)
  45 +
  46 +If the `gitlab:check` task reports an outdated version of `gitlab-shell` you should upgrade it.
42 47
43 -If the `gitlab:check` task reports an outdated version of gitlab-shell you should upgrade it.  
44 Upgrade it by running the commands below after replacing 1.9.4 with the correct version number: 48 Upgrade it by running the commands below after replacing 1.9.4 with the correct version number:
45 49
46 ``` 50 ```
@@ -49,9 +53,10 @@ sudo -u git -H git fetch @@ -49,9 +53,10 @@ sudo -u git -H git fetch
49 sudo -u git -H git checkout v1.9.4 53 sudo -u git -H git checkout v1.9.4
50 ``` 54 ```
51 55
52 -### One line upgrade command 56 +## One line upgrade command
53 57
54 You've read through the entire guide and probably already did all the steps one by one. 58 You've read through the entire guide and probably already did all the steps one by one.
  59 +
55 Here is a one line command with step 1 to 4 for the next time you upgrade: 60 Here is a one line command with step 1 to 4 for the next time you upgrade:
56 61
57 ```bash 62 ```bash
doc/web_hooks/web_hooks.md
@@ -2,16 +2,13 @@ @@ -2,16 +2,13 @@
2 2
3 Project web hooks allow you to trigger an URL if new code is pushed or a new issue is created. 3 Project web hooks allow you to trigger an URL if new code is pushed or a new issue is created.
4 4
5 ---- 5 +You can configure web hooks to listen for specific events like pushes, issues or merge requests. GitLab will send a POST request with data to the web hook URL.
6 6
7 -You can configure web hooks to listen for specific events like pushes, issues or merge requests.  
8 -GitLab will send a POST request with data to the web hook URL.  
9 Web hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server. 7 Web hooks can be used to update an external issue tracker, trigger CI builds, update a backup mirror, or even deploy to your production server.
10 -If you send a web hook to an SSL endpoint [the certificate will not be verified](https://gitlab.com/gitlab-org/gitlab-ce/blob/ccd617e58ea71c42b6b073e692447d0fe3c00be6/app/models/web_hook.rb#L35) since many people use self-signed certificates.  
11 8
12 ---- 9 +If you send a web hook to an SSL endpoint [the certificate will not be verified](https://gitlab.com/gitlab-org/gitlab-ce/blob/ccd617e58ea71c42b6b073e692447d0fe3c00be6/app/models/web_hook.rb#L35) since many people use self-signed certificates.
13 10
14 -#### Push events 11 +## Push events
15 12
16 Triggered when you push to the repository except when pushing tags. 13 Triggered when you push to the repository except when pushing tags.
17 14
@@ -57,7 +54,7 @@ Triggered when you push to the repository except when pushing tags. @@ -57,7 +54,7 @@ Triggered when you push to the repository except when pushing tags.
57 } 54 }
58 ``` 55 ```
59 56
60 -#### Issues events 57 +## Issues events
61 58
62 Triggered when a new issue is created or an existing issue was updated/closed/reopened. 59 Triggered when a new issue is created or an existing issue was updated/closed/reopened.
63 60
@@ -84,7 +81,7 @@ Triggered when a new issue is created or an existing issue was updated/closed/re @@ -84,7 +81,7 @@ Triggered when a new issue is created or an existing issue was updated/closed/re
84 } 81 }
85 ``` 82 ```
86 83
87 -#### Merge request events 84 +## Merge request events
88 85
89 Triggered when a new merge request is created or an existing merge request was updated/merged/closed. 86 Triggered when a new merge request is created or an existing merge request was updated/merged/closed.
90 87
doc/workflow/README.md
1 -+ [Workflow](workflow.md)  
2 -+ [Project Features](project_features.md) 1 +- [Workflow](workflow.md)
  2 +- [Project Features](project_features.md)
  3 +- [Authorization for merge requests](authorization_for_merge_requests.md)
doc/workflow/authorization_for_merge_requests.md
@@ -5,9 +5,13 @@ There are two main ways to have a merge request flow with GitLab: working with p @@ -5,9 +5,13 @@ There are two main ways to have a merge request flow with GitLab: working with p
5 ## Protected branch flow 5 ## Protected branch flow
6 6
7 With the protected branch flow everybody works within the same GitLab project. 7 With the protected branch flow everybody works within the same GitLab project.
  8 +
8 The project maintainers get Master access and the regular developers get Developer access. 9 The project maintainers get Master access and the regular developers get Developer access.
  10 +
9 The maintainers mark the authoritative branches as 'Protected'. 11 The maintainers mark the authoritative branches as 'Protected'.
  12 +
10 The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches. 13 The developers push feature branches to the project and create merge requests to have their feature branches reviewed and merged into one of the protected branches.
  14 +
11 Only users with Master access can merge changes into a protected branch. 15 Only users with Master access can merge changes into a protected branch.
12 16
13 ### Advantages 17 ### Advantages
@@ -22,7 +26,9 @@ Only users with Master access can merge changes into a protected branch. @@ -22,7 +26,9 @@ Only users with Master access can merge changes into a protected branch.
22 ## Forking workflow 26 ## Forking workflow
23 27
24 With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it. 28 With the forking workflow the maintainers get Master access and the regular developers get Reporter access to the authoritative repository, which prohibits them from pushing any changes to it.
  29 +
25 Developers create forks of the authoritative project and push their feature branches to their own forks. 30 Developers create forks of the authoritative project and push their feature branches to their own forks.
  31 +
26 To get their changes into master they need to create a merge request across forks. 32 To get their changes into master they need to create a merge request across forks.
27 33
28 ### Advantages 34 ### Advantages
doc/workflow/project_features.md
1 # Project features 1 # Project features
2 2
3 When in a Project -> Settings, you will find Features on the bottom of the page that you can toggle. 3 When in a Project -> Settings, you will find Features on the bottom of the page that you can toggle.
4 -Below you will find a more elaborate explanation of each of these.  
5 4
  5 +Below you will find a more elaborate explanation of each of these.
6 6
7 ## Issues 7 ## Issues
8 8
9 Issues is a really powerful, but lightweight issue tracking system. 9 Issues is a really powerful, but lightweight issue tracking system.
  10 +
10 You can make tickets, assign them to people, file them under milestones, order them with labels and have discussion in them. 11 You can make tickets, assign them to people, file them under milestones, order them with labels and have discussion in them.
11 -They integrate deeply into GitLab and are easily referenced from anywhere by using # and the issuenumber.  
12 12
  13 +They integrate deeply into GitLab and are easily referenced from anywhere by using `#` and the issue number.
13 14
14 ## Merge Requests 15 ## Merge Requests
15 16
16 Using a merge request, you can review and discuss code before it is merged in the branch of your code. 17 Using a merge request, you can review and discuss code before it is merged in the branch of your code.
  18 +
17 As with issues, it can be assigned; people, issues, etc. can be refereced; milestones attached. 19 As with issues, it can be assigned; people, issues, etc. can be refereced; milestones attached.
18 -We see it as an integral part of working together on code and couldn't work without it.  
19 20
  21 +We see it as an integral part of working together on code and couldn't work without it.
20 22
21 ## Wiki 23 ## Wiki
22 24
23 This is a separate system for documentation, built right into GitLab. 25 This is a separate system for documentation, built right into GitLab.
24 -It is source controlled and is very convenient if you don't want to keep you documentation in your source code, but you do want to keep it in your GitLab project.  
25 26
  27 +It is source controlled and is very convenient if you don't want to keep you documentation in your source code, but you do want to keep it in your GitLab project.
26 28
27 ## Wall 29 ## Wall
28 30
29 For simple, project specific conversations, the wall can be used. 31 For simple, project specific conversations, the wall can be used.
30 -It's very lightweight and simple and works well if you're not interested in using issues, but still want to occasionally communicate within a project.  
31 32
  33 +It's very lightweight and simple and works well if you're not interested in using issues, but still want to occasionally communicate within a project.
32 34
33 ## Snippets 35 ## Snippets
34 36
35 Snippets are little bits of code or text. 37 Snippets are little bits of code or text.
  38 +
36 This is a nice place to put code or text that is used semi-regularly within the project, but does not belong in source control. 39 This is a nice place to put code or text that is used semi-regularly within the project, but does not belong in source control.
  40 +
37 For example, a specific config file that is used by > the team that is only valid for the people that work on the code. 41 For example, a specific config file that is used by > the team that is only valid for the people that work on the code.
doc/workflow/workflow.md
1 # Workflow 1 # Workflow
2 2
3 -1. Clone project 3 +1. Clone project:
4 4
5 - ```bash  
6 - git clone git@example.com:project-name.git  
7 - ``` 5 + ```bash
  6 + git clone git@example.com:project-name.git
  7 + ```
8 8
9 -2. Create branch with your feature 9 +1. Create branch with your feature:
10 10
11 - ```bash  
12 - git checkout -b $feature_name  
13 - ``` 11 + ```bash
  12 + git checkout -b $feature_name
  13 + ```
14 14
15 -3. Write code. Commit changes 15 +1. Write code. Commit changes:
16 16
17 - ```bash  
18 - git commit -am "My feature is ready"  
19 - ``` 17 + ```bash
  18 + git commit -am "My feature is ready"
  19 + ```
20 20
21 -4. Push your branch to GitLab 21 +1. Push your branch to GitLab:
22 22
23 - ```bash  
24 - git push origin $feature_name  
25 - ``` 23 + ```bash
  24 + git push origin $feature_name
  25 + ```
26 26
27 -5. Review your code on commits page  
28 -6. Create a merge request  
29 -7. Your team lead will review the code &amp; merge it to the main branch 27 +1. Review your code on commits page.
  28 +
  29 +1. Create a merge request.
  30 +
  31 +1. Your team lead will review the code &amp; merge it to the main branch.
features/steps/help.rb
@@ -16,6 +16,6 @@ class Spinach::Features::Help &lt; Spinach::FeatureSteps @@ -16,6 +16,6 @@ class Spinach::Features::Help &lt; Spinach::FeatureSteps
16 end 16 end
17 17
18 step 'Header "Rebuild project satellites" should have correct ids and links' do 18 step 'Header "Rebuild project satellites" should have correct ids and links' do
19 - header_should_have_correct_id_and_link(3, '(Re-)Create satellite repos', 're-create-satellite-repos', '.documentation') 19 + header_should_have_correct_id_and_link(2, '(Re-)Create satellite repos', 're-create-satellite-repos', '.documentation')
20 end 20 end
21 end 21 end