Commit 9e924c70 authored by Sytse Sijbrandij's avatar Sytse Sijbrandij

Merge pull request #7067 from cirosantilli/doc-md-style

Update docs to match new markdown style guide 2
parents de1a7aa7 fd348de7
......@@ -24,16 +24,11 @@ Issues and merge requests should be in English and contain appropriate language
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/).
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.
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.
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).
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.
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.
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.
......@@ -42,16 +37,16 @@ Please send a merge request with a tested solution or a merge request with a fai
**[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):
1. **Summary:** Summarize your issue in one sentence (what goes wrong, what did you expect to happen)
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`)
3. **Expected behavior:** Describe your issue in detail
4. **Observed behavior**
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.
6. **Output of checks**
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`)
1. **Expected behavior:** Describe your issue in detail
1. **Observed behavior**
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.
1. **Output of checks**
* 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
* 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)
* Add the last commit sha1 of the GitLab version you used to replicate the issue (obtainable from the help page)
* Describe your setup (use relevant parts from `sudo -u git -H bundle exec rake gitlab:env:info RAILS_ENV=production`)
7. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem
1. **Possible fixes**: If you can, link to the line of code that might be responsible for the problem
## Merge requests
......@@ -87,10 +82,10 @@ For examples of feedback on merge requests please look at already [closed merge
**Please format your merge request description as follows:**
1. What does this MR do?
2. Are there points in the code the reviewer needs to double check?
3. Why was this MR needed?
4. What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?
5. Screenshots (If appropiate)
1. Are there points in the code the reviewer needs to double check?
1. Why was this MR needed?
1. What are the relevant issue numbers / [Feature requests](http://feedback.gitlab.com/)?
1. Screenshots (If appropiate)
## Contribution acceptance criteria
......@@ -106,6 +101,7 @@ For examples of feedback on merge requests please look at already [closed merge
1. It conforms to the following style guides
## Style guides
1. [Ruby](https://github.com/bbatsov/ruby-style-guide)
1. [Rails](https://github.com/bbatsov/rails-style-guide)
1. [Formatting](https://github.com/thoughtbot/guides/tree/master/style#formatting)
......
# GitLab Maintenance Policy
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.
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.
GitLab follows the [Semantic Versioning](http://semver.org/) for its releases:
`(Major).(Minor).(Patch)`.
GitLab follows the [Semantic Versioning](http://semver.org/) for its releases: `(Major).(Minor).(Patch)`.
* **Major version**: Whenever there is something significant or any backwards
incompatible changes are introduced to the public API.
* **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.
* **Patch number**: When backwards compatible bug fixes are introduced that fix
incorrect behavior.
- **Major version**: Whenever there is something significant or any backwards incompatible changes are introduced to the public API.
- **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.
- **Patch number**: When backwards compatible bug fixes are introduced that fix incorrect behavior.
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`).
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`).
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,9 +24,9 @@ Below we describe the contributing process to GitLab for two reasons. So that co
## Priorities of the issue team
1. Mentioning people (critical)
2. Workflow labels (normal)
3. Functional labels (minor)
4. Assigning issues (avoid if possible)
1. Workflow labels (normal)
1. Functional labels (minor)
1. Assigning issues (avoid if possible)
## Mentioning people
......@@ -36,11 +36,11 @@ The most important thing is making sure valid issues receive feedback from the d
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.
- _Awaiting feedback_: Feedback pending from the reporter
- _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)
- _Attached MR_: There is a MR attached and the discussion should happen there
- 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.
- _Awaiting developer action/feedback_: Issue needs to be fixed or clarified by a developer
- *Awaiting feedback*: Feedback pending from the reporter
- *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)
- *Attached MR*: There is a MR attached and the discussion should happen there
- 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.
- *Awaiting developer action/feedback*: Issue needs to be fixed or clarified by a developer
## Functional labels
......@@ -51,12 +51,13 @@ These labels describe what development specialities are involved such as: Postgr
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.
## Label colors
- Light orange `#fef2c0`: workflow labels for issue team members (awaiting feedback, awaiting confirmation of fix)
- Bright orange `#eb6420`: workflow labels for core team members (attached MR, awaiting developer action/feedback)
- Light blue `#82C5FF`: functional labels
- Green labels `#009800`: issues that can generally be ignored. For example, issues given the following labels normally can be closed immediately:
- Feature request (see copy & paste response: [Feature requests](#feature-requests))
- Support (see copy & paste response: [Support requests and configuration questions](#support-requests-and-configuration-questions)
- Light orange `#fef2c0`: workflow labels for issue team members (awaiting feedback, awaiting confirmation of fix)
- Bright orange `#eb6420`: workflow labels for core team members (attached MR, awaiting developer action/feedback)
- Light blue `#82C5FF`: functional labels
- Green labels `#009800`: issues that can generally be ignored. For example, issues given the following labels normally can be closed immediately:
- Feature request (see copy & paste response: [Feature requests](#feature-requests))
- Support (see copy & paste response: [Support requests and configuration questions](#support-requests-and-configuration-questions)
## Be kind
......@@ -102,8 +103,4 @@ This merge request has been closed because a request for more information has no
### Accepting merge requests
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.
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.
## GitLab: self hosted Git management software
# GitLab
## Self hosted Git management software
![logo](https://gitlab.com/gitlab-org/gitlab-ce/raw/master/public/gitlab_logo.png)
![animated-screenshots](https://gist.github.com/fnkr/2f9badd56bfe0ed04ee7/raw/4f48806fbae97f556c2f78d8c2d299c04500cb0d/compiled.gif)
### Gitlab is open source software to collaborate on code
## Open source software to collaborate on code
* Manage git repositories with fine grained access controls that keep your code secure
* Perform code reviews and enhance collaboration with merge requests
* Each project can also have an issue tracker and a wiki
* Used by more than 100,000 organizations, GitLab is the most popular solution to manage git repositories on-premises
* Completely free and open source (MIT Expat license)
* Powered by Ruby on Rails
- Manage Git repositories with fine grained access controls that keep your code secure
- Perform code reviews and enhance collaboration with merge requests
- Each project can also have an issue tracker and a wiki
- Used by more than 100,000 organizations, GitLab is the most popular solution to manage Git repositories on-premises
- Completely free and open source (MIT Expat license)
- Powered by Ruby on Rails
### Canonical source
## Canonical source
* 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.
- 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.
### Code status
## Code status
* [![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)
- [![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)
* [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
* [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
* [![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)
- [![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)
### Resources
* [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/).
- [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/).
* [GitLab Enterprise Edition](https://www.gitlab.com/gitlab-ee/) offers additional features aimed at larger organizations.
- [GitLab Enterprise Edition](https://www.gitlab.com/gitlab-ee/) offers additional features aimed at larger organizations.
* [GitLab CI](https://www.gitlab.com/gitlab-ci/) is a continuous integration (CI) server that is easy to integrate with GitLab.
- [GitLab CI](https://www.gitlab.com/gitlab-ci/) is a continuous integration (CI) server that is easy to integrate with GitLab.
* 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.
- 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.
### Requirements
## Requirements
* Ubuntu/Debian/CentOS/RHEL**
* ruby 2.0+
* git 1.7.10+
* redis 2.0+
* MySQL or PostgreSQL
- Ubuntu/Debian/CentOS/RHEL**
- ruby 2.0+
- git 1.7.10+
- redis 2.0+
- MySQL or PostgreSQL
** More details are in the [requirements doc](doc/install/requirements.md)
** More details are in the [requirements doc](doc/install/requirements.md).
### Installation
## Installation
Please see [the installation page on the GitLab website](https://www.gitlab.com/installation/).
......@@ -59,22 +61,21 @@ Since 2011 a minor or major version of GitLab is released on the 22nd of every m
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).
### Run in production mode
## Run in production mode
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:
sudo service gitlab start
or by directly calling the script
or by directly calling the script:
sudo /etc/init.d/gitlab start
Please login with root / 5iveL!fe
Please login with `root` / `5iveL!fe`.
### Install a development environment
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
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
cp config/unicorn.rb.example.development config/unicorn.rb
......@@ -84,36 +85,35 @@ Start it with [Foreman](https://github.com/ddollar/foreman)
bundle exec foreman start -p 3000
or start each component separately
or start each component separately:
bundle exec rails s
bin/background_jobs start
And surf to [localhost:3000](http://localhost:3000/) and login with root / 5iveL!fe
And surf to [localhost:3000](http://localhost:3000/) and login with `root` / `5iveL!fe`.
### Run the tests
## Run the tests
* Run all tests
- Run all tests:
bundle exec rake test
* [RSpec](http://rspec.info/) unit and functional tests
All RSpec tests: bundle exec rake spec
- [RSpec](http://rspec.info/) unit and functional tests.
Single RSpec file: bundle exec rspec spec/controllers/commit_controller_spec.rb
All RSpec tests: `bundle exec rake spec`
* [Spinach](https://github.com/codegram/spinach) integration tests
Single RSpec file: `bundle exec rspec spec/controllers/commit_controller_spec.rb`
All Spinach tests: bundle exec rake spinach
- [Spinach](https://github.com/codegram/spinach) integration tests.
Single Spinach test: bundle exec spinach features/project/issues/milestones.feature
All Spinach tests: `bundle exec rake spinach`
Single Spinach test: `bundle exec spinach features/project/issues/milestones.feature`
### Documentation
## Documentation
All documentation can be found on [doc.gitlab.com/ce/](http://doc.gitlab.com/ce/).
### Getting help
## Getting help
Please see [Getting help for GitLab](https://www.gitlab.com/getting-help/) on our website for the many options to get help.
**User documentation**
# Documentation
+ [API](api/README.md) Explore how you can access GitLab via a simple and powerful API.
+ [Markdown](markdown/markdown.md) Learn what you can do with GitLab's advanced formatting system.
+ [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do.
+ [Public access](public_access/public_access.md) Learn how you can allow public and internal access to a project.
+ [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
+ [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
+ [Workflow](workflow/README.md) Learn how to use Git and GitLab together.
## User documentation
**Administrator documentation**
- [API](api/README.md) Explore how you can access GitLab via a simple and powerful API.
- [Markdown](markdown/markdown.md) Learn what you can do with GitLab's advanced formatting system.
- [Permissions](permissions/permissions.md) Learn what each role in a project (guest/reporter/developer/master/owner) can do.
- [Public access](public_access/public_access.md) Learn how you can allow public and internal access to a project.
- [SSH](ssh/README.md) Setup your ssh keys and deploy keys for secure access to your projects.
- [Web hooks](web_hooks/web_hooks.md) Let GitLab notify you when new code has been pushed to your project.
- [Workflow](workflow/README.md) Learn how to use Git and GitLab together.
+ [Install](install/README.md) Requirements, directory structures and manual installation.
+ [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
+ [Raketasks](raketasks/README.md) Explore what GitLab has in store for you to make administration easier.
+ [System hooks](system_hooks/system_hooks.md) Let GitLab notify you when certain management tasks need to be carried out.
+ [Security](security/README.md) Learn what you can do to further secure your GitLab instance.
+ [Update](update/README.md) Update guides to upgrade your installation.
## Administrator documentation
**Contributor documentation**
- [Install](install/README.md) Requirements, directory structures and manual installation.
- [Integration](integration/README.md) How to integrate with systems such as JIRA, Redmine, LDAP and Twitter.
- [Raketasks](raketasks/README.md) Explore what GitLab has in store for you to make administration easier.
- [System hooks](system_hooks/system_hooks.md) Let GitLab notify you when certain management tasks need to be carried out.
- [Security](security/README.md) Learn what you can do to further secure your GitLab instance.
- [Update](update/README.md) Update guides to upgrade your installation.
+ [Development](development/README.md) Explains the architecture and the guidelines for shell commands.
+ [Legal](legal/README.md) Contributor license agreements.
+ [Release](release/README.md) How to make the monthly and security releases.
## Contributor documentation
- [Development](development/README.md) Explains the architecture and the guidelines for shell commands.
- [Legal](legal/README.md) Contributor license agreements.
- [Release](release/README.md) How to make the monthly and security releases.
......@@ -2,31 +2,31 @@
## Resources
+ [Users](users.md)
+ [Session](session.md)
+ [Projects](projects.md)
+ [Project Snippets](project_snippets.md)
+ [Repositories](repositories.md)
+ [Repository Files](repository_files.md)
+ [Commits](commits.md)
+ [Branches](branches.md)
+ [Merge Requests](merge_requests.md)
+ [Issues](issues.md)
+ [Milestones](milestones.md)
+ [Notes](notes.md) (comments)
+ [Deploy Keys](deploy_keys.md)
+ [System Hooks](system_hooks.md)
+ [Groups](groups.md)
- [Users](users.md)
- [Session](session.md)
- [Projects](projects.md)
- [Project Snippets](project_snippets.md)
- [Repositories](repositories.md)
- [Repository Files](repository_files.md)
- [Commits](commits.md)
- [Branches](branches.md)
- [Merge Requests](merge_requests.md)
- [Issues](issues.md)
- [Milestones](milestones.md)
- [Notes](notes.md) (comments)
- [Deploy Keys](deploy_keys.md)
- [System Hooks](system_hooks.md)
- [Groups](groups.md)
## Clients
+ [php-gitlab-api](https://github.com/m4tthumphrey/php-gitlab-api) - PHP
+ [Laravel API Wrapper for GitLab CE](https://github.com/adamgoose/gitlab) - PHP / [Laravel](http://laravel.com)
+ [Ruby Wrapper](https://github.com/NARKOZ/gitlab) - Ruby
+ [python-gitlab](https://github.com/Itxaka/python-gitlab) - Python
+ [java-gitlab-api](https://github.com/timols/java-gitlab-api) - Java
+ [node-gitlab](https://github.com/moul/node-gitlab) - Node.js
+ [NGitLab](https://github.com/Scooletz/NGitLab) - .NET
- [php-gitlab-api](https://github.com/m4tthumphrey/php-gitlab-api) - PHP
- [Laravel API Wrapper for GitLab CE](https://github.com/adamgoose/gitlab) - PHP / [Laravel](http://laravel.com)
- [Ruby Wrapper](https://github.com/NARKOZ/gitlab) - Ruby
- [python-gitlab](https://github.com/Itxaka/python-gitlab) - Python
- [java-gitlab-api](https://github.com/timols/java-gitlab-api) - Java
- [node-gitlab](https://github.com/moul/node-gitlab) - Node.js
- [NGitLab](https://github.com/Scooletz/NGitLab) - .NET
## Introduction
......@@ -54,41 +54,35 @@ Example for a valid API request using curl and authentication via header:
curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" "http://example.com/api/v3/projects"
```
The API uses JSON to serialize data. You don't need to specify `.json` at the end of API URL.
## Status codes
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.
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.
API request types:
* `GET` requests access one or more resources and return the result as JSON
* `POST` requests return `201 Created` if the resource is successfully created and return the newly created resource as JSON
* `GET`, `PUT` and `DELETE` return `200 Ok` if the resource is accessed, modified or deleted successfully, the (modified) result is returned as JSON
* `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.
- `GET` requests access one or more resources and return the result as JSON
- `POST` requests return `201 Created` if the resource is successfully created and return the newly created resource as JSON
- `GET`, `PUT` and `DELETE` return `200 Ok` if the resource is accessed, modified or deleted successfully, the (modified) result is returned as JSON
- `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.
The following list shows the possible return codes for API requests.
Return values:
* `200 Ok` - The `GET`, `PUT` or `DELETE` request was successful, the resource(s) itself is returned as JSON
* `201 Created` - The `POST` request was successful and the resource is returned as JSON
* `400 Bad Request` - A required attribute of the API request is missing, e.g. the title of an issue is not given
* `401 Unauthorized` - The user is not authenticated, a valid user token is necessary, see above
* `403 Forbidden` - The request is not allowed, e.g. the user is not allowed to delete a project
* `404 Not Found` - A resource could not be accessed, e.g. an ID for a resource could not be found
* `405 Method Not Allowed` - The request is not supported
* `409 Conflict` - A conflicting resource already exists, e.g. creating a project with a name that already exists
* `500 Server Error` - While handling the request something went wrong on the server side
- `200 Ok` - The `GET`, `PUT` or `DELETE` request was successful, the resource(s) itself is returned as JSON
- `201 Created` - The `POST` request was successful and the resource is returned as JSON
- `400 Bad Request` - A required attribute of the API request is missing, e.g. the title of an issue is not given
- `401 Unauthorized` - The user is not authenticated, a valid user token is necessary, see above
- `403 Forbidden` - The request is not allowed, e.g. the user is not allowed to delete a project
- `404 Not Found` - A resource could not be accessed, e.g. an ID for a resource could not be found
- `405 Method Not Allowed` - The request is not supported
- `409 Conflict` - A conflicting resource already exists, e.g. creating a project with a name that already exists
- `500 Server Error` - While handling the request something went wrong on the server side
## Sudo
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).
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:
```
GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U&sudo=username
```
```
GET http://example.com/api/v3/projects?private_token=QVy1PB7sTxfy4pqfZM1U&sudo=23
```
Example for a valid API request with sudo using curl and authentication via header:
```
curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: username" "http://example.com/api/v3/projects"
```
```
curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http://example.com/api/v3/projects"
```
......@@ -130,24 +125,21 @@ curl --header "PRIVATE-TOKEN: QVy1PB7sTxfy4pqfZM1U" --header "SUDO: 23" "http://
When listing resources you can pass the following parameters:
+ `page` (default: `1`) - page number
+ `per_page` (default: `20`, max: `100`) - number of items to list per page
- `page` (default: `1`) - page number
- `per_page` (default: `20`, max: `100`) - number of items to list per page
[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.
[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.
## id vs iid
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:
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:
Issue:
Issue
id: 46
iid: 5
id: 46
iid: 5
* id - is uniq across all Issues table. It used for any api calls.
* iid - is uniq only in scope of single project. When you browse issues or merge requests with Web UI - you see iid.
- id - is uniq across all Issues table. It used for any api calls.
- iid - is uniq only in scope of single project. When you browse issues or merge requests with Web UI - you see iid.
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`
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`
......@@ -10,7 +10,7 @@ GET /projects/:id/repository/branches
Parameters:
+ `id` (required) - The ID of a project
- `id` (required) - The ID of a project
```json
[
......@@ -52,8 +52,8 @@ GET /projects/:id/repository/branches/:branch
Parameters:
+ `id` (required) - The ID of a project
+ `branch` (required) - The name of the branch
- `id` (required) - The ID of a project
- `branch` (required) - The name of the branch
```json
{
......@@ -82,7 +82,6 @@ Parameters:
}
```
## Protect repository branch
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
Parameters:
+ `id` (required) - The ID of a project
+ `branch` (required) - The name of the branch
- `id` (required) - The ID of a project
- `branch` (required) - The name of the branch
```json
{
......@@ -124,7 +123,6 @@ Parameters:
}
```
## Unprotect repository branch
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
Parameters:
+ `id` (required) - The ID of a project
+ `branch` (required) - The name of the branch
- `id` (required) - The ID of a project
- `branch` (required) - The name of the branch
```json
{
......@@ -168,16 +166,15 @@ Parameters:
## Create repository branch
```
POST /projects/:id/repository/branches
```
Parameters:
+ `id` (required) - The ID of a project
+ `branch_name` (required) - The name of the branch
+ `ref` (required) - Create branch from commit sha or existing branch
- `id` (required) - The ID of a project
- `branch_name` (required) - The name of the branch
- `ref` (required) - Create branch from commit sha or existing branch
```json
{
......
......@@ -10,8 +10,8 @@ GET /projects/:id/repository/commits
Parameters:
+ `id` (required) - The ID of a project
+ `ref_name` (optional) - The name of a repository branch or tag or if not given the default branch
- `id` (required) - The ID of a project
- `ref_name` (optional) - The name of a repository branch or tag or if not given the default branch
```json
[
......@@ -44,8 +44,8 @@ GET /projects/:id/repository/commits/:sha
Parameters:
+ `id` (required) - The ID of a project
+ `sha` (required) - The commit hash or name of a repository branch or tag
- `id` (required) - The ID of a project
- `sha` (required) - The commit hash or name of a repository branch or tag
```json
{
......@@ -63,7 +63,6 @@ Parameters:
}
```
## Get the diff of a commit
Get the diff of a commit in a project.
......@@ -74,8 +73,8 @@ GET /projects/:id/repository/commits/:sha/diff
Parameters:
+ `id` (required) - The ID of a project
+ `sha` (required) - The name of a repository branch or tag or if not given the default branch
- `id` (required) - The ID of a project
- `sha` (required) - The name of a repository branch or tag or if not given the default branch
```json
[
......@@ -91,5 +90,3 @@ Parameters:
}
]
```
# Deploy Keys
### List deploy keys
## List deploy keys
Get a list of a project's deploy keys.
......@@ -10,7 +10,7 @@ GET /projects/:id/keys
Parameters:
+ `id` (required) - The ID of the project
- `id` (required) - The ID of the project
```json
[
......@@ -29,8 +29,7 @@ Parameters:
]
```
### Single deploy key
## Single deploy key
Get a single key.
......@@ -40,8 +39,8 @@ GET /projects/:id/keys/:key_id
Parameters:
+ `id` (required) - The ID of the project
+ `key_id` (required) - The ID of the deploy key
- `id` (required) - The ID of the project
- `key_id` (required) - The ID of the deploy key
```json
{
......@@ -52,8 +51,7 @@ Parameters:
}
```
### Add deploy key
## Add deploy key
Creates a new deploy key for a project.
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
Parameters:
+ `id` (required) - The ID of the project
+ `title` (required) - New deploy key's title
+ `key` (required) - New deploy key
- `id` (required) - The ID of the project
- `title` (required) - New deploy key's title
- `key` (required) - New deploy key
### Delete deploy key
## Delete deploy key
Delete a deploy key from a project
......@@ -79,6 +76,5 @@ DELETE /projects/:id/keys/:key_id
Parameters:
+ `id` (required) - The ID of the project
+ `key_id` (required) - The ID of the deploy key
- `id` (required) - The ID of the project
- `key_id` (required) - The ID of the deploy key
......@@ -73,7 +73,6 @@ GET /issues
]
```
## List project issues
Get a list of project issues. This function accepts pagination parameters `page` and `per_page`
......@@ -85,8 +84,7 @@ GET /projects/:id/issues
Parameters:
+ `id` (required) - The ID of a project
- `id` (required) - The ID of a project
## Single issue
......@@ -98,8 +96,8 @@ GET /projects/:id/issues/:issue_id
Parameters:
+ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of a project issue
- `id` (required) - The ID of a project
- `issue_id` (required) - The ID of a project issue
```json
{
......@@ -142,7 +140,6 @@ Parameters:
}
```
## New issue
Creates a new project issue.
......@@ -153,13 +150,12 @@ POST /projects/:id/issues
Parameters:
+ `id` (required) - The ID of a project
+ `title` (required) - The title of an issue
+ `description` (optional) - The description of an issue
+ `assignee_id` (optional) - The ID of a user to assign issue
+ `milestone_id` (optional) - The ID of a milestone to assign issue
+ `labels` (optional) - Comma-separated label names for an issue
- `id` (required) - The ID of a project
- `title` (required) - The title of an issue
- `description` (optional) - The description of an issue
- `assignee_id` (optional) - The ID of a user to assign issue
- `milestone_id` (optional) - The ID of a milestone to assign issue
- `labels` (optional) - Comma-separated label names for an issue
## Edit issue
......@@ -171,21 +167,18 @@ PUT /projects/:id/issues/:issue_id
Parameters:
+ `id` (required) - The ID of a project
+ `issue_id` (required) - The ID of a project's issue
+ `title` (optional) - The title of an issue
+ `description` (optional) - The description of an issue
+ `assignee_id` (optional) - The ID of a user to assign issue
+ `milestone_id` (optional) - The ID of a milestone to assign issue
+ `labels` (optional) - Comma-separated label names for an issue
+ `state_event` (optional) - The state event of an issue ('close' to close issue and 'reopen' to reopen it)
- `id` (required) - The ID of a project
- `issue_id` (required) - The ID of a project's issue
- `title` (optional) - The title of an issue
- `description` (optional) - The description of an issue
- `assignee_id` (optional) - The ID of a user to assign issue
- `milestone_id` (optional) - The ID of a milestone to assign issue
- `labels` (optional) - Comma-separated label names for an issue
- `state_event` (optional) - The state event of an issue ('close' to close issue and 'reopen' to reopen it)
## Delete existing issue (**Deprecated**)
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.
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.
```
DELETE /projects/:id/issues/:issue_id
......@@ -193,8 +186,8 @@ DELETE /projects/:id/issues/:issue_id
Parameters:
+ `id` (required) - The project ID
+ `issue_id` (required) - The ID of the issue
- `id` (required) - The project ID
- `issue_id` (required) - The ID of the issue
## Comments on issues
......
......@@ -2,11 +2,7 @@
## List merge requests
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.
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.
```
GET /projects/:id/merge_requests
......@@ -16,8 +12,8 @@ GET /projects/:id/merge_requests?state=all
Parameters:
+ `id` (required) - The ID of a project
+ `state` (optional) - Return `all` requests or just those that are `merged`, `opened` or `closed`
- `id` (required) - The ID of a project
- `state` (optional) - Return `all` requests or just those that are `merged`, `opened` or `closed`
```json
[
......@@ -51,7 +47,6 @@ Parameters:
]
```
## Get single MR
Shows information about a single merge request.
......@@ -62,8 +57,8 @@ GET /projects/:id/merge_request/:merge_request_id
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - The ID of MR
- `id` (required) - The ID of a project
- `merge_request_id` (required) - The ID of MR
```json
{
......@@ -95,7 +90,6 @@ Parameters:
}
```
## Create MR
Creates a new merge request.
......@@ -106,12 +100,12 @@ POST /projects/:id/merge_requests
Parameters:
+ `id` (required) - The ID of a project
+ `source_branch` (required) - The source branch
+ `target_branch` (required) - The target branch
+ `assignee_id` (optional) - Assignee user ID
+ `title` (required) - Title of MR
+ `target_project_id` (optional) - The target project (numeric id)
- `id` (required) - The ID of a project
- `source_branch` (required) - The source branch
- `target_branch` (required) - The target branch
- `assignee_id` (optional) - Assignee user ID
- `title` (required) - Title of MR
- `target_project_id` (optional) - The target project (numeric id)
```json
{
......@@ -142,7 +136,6 @@ Parameters:
}
```
## Update MR
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
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - ID of MR
+ `source_branch` - The source branch
+ `target_branch` - The target branch
+ `assignee_id` - Assignee user ID
+ `title` - Title of MR
+ `state_event` - New state (close|reopen|merge)
- `id` (required) - The ID of a project
- `merge_request_id` (required) - ID of MR
- `source_branch` - The source branch
- `target_branch` - The target branch
- `assignee_id` - Assignee user ID
- `title` - Title of MR
- `state_event` - New state (close|reopen|merge)
```json
{
......@@ -190,13 +183,16 @@ Parameters:
}
```
## Accept MR
Merge changes submitted with MR usign this API.
If merge success you get 200 OK.
If it has some conflicts and can not be merged - you get 405 and error message 'Branch cannot be merged'
If merge request is already merged or closed - you get 405 and error message 'Method Not Allowed'
If you dont have permissions to accept this merge request - you get 401
```
......@@ -205,9 +201,9 @@ PUT /projects/:id/merge_request/:merge_request_id/merge
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - ID of MR
+ `merge_commit_message` (optional) - Custom merge commit message
- `id` (required) - The ID of a project
- `merge_request_id` (required) - ID of MR
- `merge_commit_message` (optional) - Custom merge commit message
```json
{
......@@ -238,7 +234,6 @@ Parameters:
}
```
## Post comment to MR
Adds a comment to a merge request.
......@@ -249,10 +244,9 @@ POST /projects/:id/merge_request/:merge_request_id/comments
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - ID of merge request
+ `note` (required) - Text of comment
- `id` (required) - The ID of a project
- `merge_request_id` (required) - ID of merge request
- `note` (required) - Text of comment
```json
{
......@@ -268,7 +262,6 @@ Parameters:
}
```
## Get the comments on a MR
Gets all the comments associated with a merge request.
......@@ -279,8 +272,8 @@ GET /projects/:id/merge_request/:merge_request_id/comments
Parameters:
+ `id` (required) - The ID of a project
+ `merge_request_id` (required) - ID of merge request
- `id` (required) - The ID of a project
- `merge_request_id` (required) - ID of merge request
```json
[
......
......@@ -26,8 +26,7 @@ GET /projects/:id/milestones
Parameters:
+ `id` (required) - The ID of a project
- `id` (required) - The ID of a project
## Get single milestone
......@@ -39,9 +38,8 @@ GET /projects/:id/milestones/:milestone_id
Parameters:
+ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
- `id` (required) - The ID of a project
- `milestone_id` (required) - The ID of a project milestone
## Create new milestone
......@@ -53,11 +51,10 @@ POST /projects/:id/milestones
Parameters:
+ `id` (required) - The ID of a project
+ `title` (required) - The title of an milestone
+ `description` (optional) - The description of the milestone
+ `due_date` (optional) - The due date of the milestone
- `id` (required) - The ID of a project
- `title` (required) - The title of an milestone
- `description` (optional) - The description of the milestone
- `due_date` (optional) - The due date of the milestone
## Edit milestone
......@@ -69,10 +66,9 @@ PUT /projects/:id/milestones/:milestone_id
Parameters:
+ `id` (required) - The ID of a project
+ `milestone_id` (required) - The ID of a project milestone
+ `title` (optional) - The title of a milestone
+ `description` (optional) - The description of a milestone
+ `due_date` (optional) - The due date of the milestone
+ `state_event` (optional) - The state event of the milestone (close|activate)
- `id` (required) - The ID of a project
- `milestone_id` (required) - The ID of a project milestone
- `title` (optional) - The title of a milestone
- `description` (optional) - The description of a milestone
- `due_date` (optional) - The due date of the milestone
- `state_event` (optional) - The state event of the milestone (close|activate)
......@@ -10,8 +10,7 @@ GET /projects/:id/snippets
Parameters:
+ `id` (required) - The ID of a project
- `id` (required) - The ID of a project
## Single snippet
......@@ -23,8 +22,8 @@ GET /projects/:id/snippets/:snippet_id
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of a project's snippet
```json
{
......@@ -45,7 +44,6 @@ Parameters:
}
```
## Create new snippet
Creates a new project snippet. The user must have permission to create new snippets.
......@@ -56,11 +54,10 @@ POST /projects/:id/snippets
Parameters:
+ `id` (required) - The ID of a project
+ `title` (required) - The title of a snippet
+ `file_name` (required) - The name of a snippet file
+ `code` (required) - The content of a snippet
- `id` (required) - The ID of a project
- `title` (required) - The title of a snippet
- `file_name` (required) - The name of a snippet file
- `code` (required) - The content of a snippet
## Update snippet
......@@ -72,12 +69,11 @@ PUT /projects/:id/snippets/:snippet_id
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
+ `title` (optional) - The title of a snippet
+ `file_name` (optional) - The name of a snippet file
+ `code` (optional) - The content of a snippet
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of a project's snippet
- `title` (optional) - The title of a snippet
- `file_name` (optional) - The name of a snippet file
- `code` (optional) - The content of a snippet
## Delete snippet
......@@ -90,9 +86,8 @@ DELETE /projects/:id/snippets/:snippet_id
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of a project's snippet
## Snippet content
......@@ -104,5 +99,5 @@ GET /projects/:id/snippets/:snippet_id/raw
Parameters:
+ `id` (required) - The ID of a project
+ `snippet_id` (required) - The ID of a project's snippet
- `id` (required) - The ID of a project
- `snippet_id` (required) - The ID of a project's snippet
......@@ -4,12 +4,11 @@
## Create, read, update and delete repository files using this API
- - -
---
## Get file from repository
Allows you to receive information about file in repository like name, size, content.
Note that file content is Base64 encoded.
Allows you to receive information about file in repository like name, size, content. Note that file content is Base64 encoded.
```
GET /projects/:id/repository/files
......@@ -32,8 +31,8 @@ Example response:
Parameters:
+ `file_path` (required) - Full path to new file. Ex. lib/class.rb
+ `ref` (required) - The name of branch, tag or commit
- `file_path` (required) - Full path to new file. Ex. lib/class.rb
- `ref` (required) - The name of branch, tag or commit
## Create new file in repository
......@@ -52,11 +51,11 @@ Example response:
Parameters:
+ `file_path` (required) - Full path to new file. Ex. lib/class.rb
+ `branch_name` (required) - The name of branch
+ `encoding` (optional) - 'text' or 'base64'. Text is default.
+ `content` (required) - File content
+ `commit_message` (required) - Commit message
- `file_path` (required) - Full path to new file. Ex. lib/class.rb
- `branch_name` (required) - The name of branch
- `encoding` (optional) - 'text' or 'base64'. Text is default.
- `content` (required) - File content
- `commit_message` (required) - Commit message
## Update existing file in repository
......@@ -75,11 +74,11 @@ Example response:
Parameters:
+ `file_path` (required) - Full path to file. Ex. lib/class.rb
+ `branch_name` (required) - The name of branch
+ `encoding` (optional) - 'text' or 'base64'. Text is default.
+ `content` (required) - New file content
+ `commit_message` (required) - Commit message
- `file_path` (required) - Full path to file. Ex. lib/class.rb
- `branch_name` (required) - The name of branch
- `encoding` (optional) - 'text' or 'base64'. Text is default.
- `content` (required) - New file content
- `commit_message` (required) - Commit message
## Delete existing file in repository
......@@ -98,7 +97,6 @@ Example response:
Parameters:
+ `file_path` (required) - Full path to file. Ex. lib/class.rb
+ `branch_name` (required) - The name of branch
+ `commit_message` (required) - Commit message
- `file_path` (required) - Full path to file. Ex. lib/class.rb
- `branch_name` (required) - The name of branch
- `commit_message` (required) - Commit message
......@@ -2,7 +2,7 @@
All methods require admin authorization.
The url endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks).
The URL endpoint of the system hooks can be configured in [the admin area under hooks](/admin/hooks).
## List system hooks
......@@ -14,7 +14,7 @@ GET /hooks
Parameters:
+ **none**
- **none**
```json
[
......@@ -34,8 +34,7 @@ POST /hooks
Parameters:
+ `url` (required) - The hook URL
- `url` (required) - The hook URL
## Test system hook
......@@ -45,7 +44,7 @@ GET /hooks/:id
Parameters:
+ `id` (required) - The ID of hook
- `id` (required) - The ID of hook
```json
{
......@@ -60,8 +59,7 @@ Parameters:
## Delete system hook
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.
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.
```
DELETE /hooks/:id
......@@ -69,4 +67,4 @@ DELETE /hooks/:id
Parameters:
+ `id` (required) - The ID of hook
- `id` (required) - The ID of hook
......@@ -3,6 +3,7 @@
## List users
Get a list of users.
This function takes pagination parameters `page` and `per_page` to restrict the list of users.
```
......@@ -53,8 +54,7 @@ GET /users
]
```
You can search for a users by email or username with:
`/users?search=John`
You can search for a users by email or username with: `/users?search=John`
Also see `def search query` in `app/models/user.rb`.
......@@ -68,7 +68,7 @@ GET /users/:id
Parameters:
+ `id` (required) - The ID of a user
- `id` (required) - The ID of a user
```json
{
......@@ -93,7 +93,6 @@ Parameters:
}
```
## User creation
Creates a new user. Note only administrators can create new users.
......@@ -104,21 +103,20 @@ POST /users
Parameters:
+ `email` (required) - Email
+ `password` (required) - Password
+ `username` (required) - Username
+ `name` (required) - Name
+ `skype` (optional) - Skype ID
+ `linkedin` (optional) - Linkedin
+ `twitter` (optional) - Twitter account
+ `website_url` (optional) - Website url
+ `projects_limit` (optional) - Number of projects user can create
+ `extern_uid` (optional) - External UID
+ `provider` (optional) - External provider name
+ `bio` (optional) - User's bio
+ `admin` (optional) - User is admin - true or false (default)
+ `can_create_group` (optional) - User can create groups - true or false
- `email` (required) - Email
- `password` (required) - Password
- `username` (required) - Username
- `name` (required) - Name
- `skype` (optional) - Skype ID
- `linkedin` (optional) - Linkedin
- `twitter` (optional) - Twitter account
- `website_url` (optional) - Website url
- `projects_limit` (optional) - Number of projects user can create
- `extern_uid` (optional) - External UID
- `provider` (optional) - External provider name
- `bio` (optional) - User's bio
- `admin` (optional) - User is admin - true or false (default)
- `can_create_group` (optional) - User can create groups - true or false
## User modification
......@@ -130,30 +128,26 @@ PUT /users/:id
Parameters:
+ `email` - Email
+ `username` - Username
+ `name` - Name
+ `password` - Password
+ `skype` - Skype ID
+ `linkedin` - Linkedin
+ `twitter` - Twitter account
+ `website_url` - Website url
+ `projects_limit` - Limit projects each user can create
+ `extern_uid` - External UID
+ `provider` - External provider name
+ `bio` - User's bio
+ `admin` (optional) - User is admin - true or false (default)
+ `can_create_group` (optional) - User can create groups - true or false
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.
- `email` - Email
- `username` - Username
- `name` - Name
- `password` - Password
- `skype` - Skype ID
- `linkedin` - Linkedin
- `twitter` - Twitter account
- `website_url` - Website url
- `projects_limit` - Limit projects each user can create
- `extern_uid` - External UID
- `provider` - External provider name
- `bio` - User's bio
- `admin` (optional) - User is admin - true or false (default)
- `can_create_group` (optional) - User can create groups - true or false
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.
## User deletion
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.
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.
```
DELETE /users/:id
......@@ -161,8 +155,7 @@ DELETE /users/:id
Parameters:
+ `id` (required) - The ID of the user
- `id` (required) - The ID of the user
## Current user
......@@ -194,7 +187,6 @@ GET /user
}
```
## List SSH keys
Get a list of currently authenticated user's SSH keys.
......@@ -220,7 +212,7 @@ GET /user/keys
Parameters:
+ **none**
- **none**
## List SSH keys for user
......@@ -232,8 +224,7 @@ GET /users/:uid/keys
Parameters:
+ `uid` (required) - id of specified user
- `uid` (required) - id of specified user
## Single SSH key
......@@ -245,7 +236,7 @@ GET /user/keys/:id
Parameters:
+ `id` (required) - The ID of an SSH key
- `id` (required) - The ID of an SSH key
```json
{
......@@ -255,7 +246,6 @@ Parameters:
}
```
## Add SSH key
Creates a new key owned by the currently authenticated user.
......@@ -266,9 +256,8 @@ POST /user/keys
Parameters:
+ `title` (required) - new SSH Key's title
+ `key` (required) - new SSH key
- `title` (required) - new SSH Key's title
- `key` (required) - new SSH key
## Add SSH key for user
......@@ -280,17 +269,15 @@ POST /users/:id/keys
Parameters:
+ `id` (required) - id of specified user
+ `title` (required) - new SSH Key's title
+ `key` (required) - new SSH key
- `id` (required) - id of specified user
- `title` (required) - new SSH Key's title
- `key` (required) - new SSH key
Will return created key with status `201 Created` on success, or `404 Not
found` on fail.
Will return created key with status `201 Created` on success, or `404 Not found` on fail.
## Delete SSH key
## Delete SSH key for current user
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`.
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`.
```
DELETE /user/keys/:id
......@@ -298,9 +285,9 @@ DELETE /user/keys/:id
Parameters:
+ `id` (required) - SSH key ID
- `id` (required) - SSH key ID
## Delete SSH key
## Delete SSH key for given user
Deletes key owned by a specified user. Available only for admin.
......@@ -310,8 +297,7 @@ DELETE /users/:uid/keys/:id
Parameters:
+ `uid` (required) - id of specified user
+ `id` (required) - SSH key ID
- `uid` (required) - id of specified user
- `id` (required) - SSH key ID
Will return `200 Ok` on success, or `404 Not found` if either user or key cannot be found.
## Development
# Development
+ [Architecture](architecture.md) of GitLab
+ [Shell commands](shell_commands.md) in the GitLab codebase
+ [Rake tasks](rake_tasks.md) for development
- [Architecture](architecture.md) of GitLab
- [Shell commands](shell_commands.md) in the GitLab codebase
- [Rake tasks](rake_tasks.md) for development
This diff is collapsed.
......@@ -8,9 +8,7 @@
## Use File and FileUtils instead of shell commands
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
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>
```ruby
# Wrong
......@@ -30,12 +28,7 @@ This coding style could have prevented CVE-2013-4490.
## Bypass the shell by splitting commands into separate tokens
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
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
```ruby
# Wrong
......@@ -55,8 +48,7 @@ This coding style could have prevented CVE-2013-4546.
## Separate options from arguments with --
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.
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.
To understand what `--` does, consider the problem below.
......@@ -68,9 +60,7 @@ cat: illegal option -- l
usage: cat [-benstuv] [file ...]
```
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 `--`.
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 `--`.
```
# Example (continued)
......@@ -91,9 +81,7 @@ This coding style could have prevented CVE-2013-4582.
## Do not use the backticks
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.
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.
```ruby
# Wrong
......
+ [Installation](installation.md)
+ [Requirements](requirements.md)
+ [Structure](structure.md)
+ [Database MySQL](database_mysql.md)
# Installation
- [Installation](installation.md)
- [Requirements](requirements.md)
- [Structure](structure.md)
- [Database MySQL](database_mysql.md)
This diff is collapsed.
......@@ -4,7 +4,7 @@
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).
## Supported Linux distributions
### Supported Linux distributions
- Ubuntu
- Debian
......@@ -13,37 +13,42 @@ GitLab is developed for the Linux operating system. For the installations option
- Scientific Linux
- Oracle Linux
## Unsupported Linux distributions
### Unsupported Linux distributions
- Arch Linux
- Fedora
- Gentoo
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).
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).
## Unsupported Unix operating systems
### Unsupported Unix operating systems
There is nothing that prevents GitLab from running on other Unix operating systems.
This means you may get it to work on systems running FreeBSD or OS X.
If you want to do this, please be aware it could be a lot of work.
Please consider using a virtual machine to run GitLab.
## Other operating systems such as Windows
### Other operating systems such as Windows
GitLab does **not** run on Windows and we have no plans of supporting it in the near future.
Please consider using a virtual machine to run GitLab.
Please consider using a virtual machine to run GitLab.
# Ruby versions
## Ruby versions
GitLab requires Ruby (MRI) 2.0+.
>>>>>>> Update docs to markdown style guide.
You will have to use the standard MRI implementation of Ruby.
We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions.
We love [JRuby](http://jruby.org/) and [Rubinius](http://rubini.us/)) but GitLab needs several Gems that have native extensions.
# Hardware requirements
## Hardware requirements
## CPU
### CPU
- 1 core works supports up to 100 users but the application will not be responsive
- **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
- 32 cores supports up to 20,000 users
- 64 cores supports up to 40,000 users
## Memory
### Memory
- 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
- 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
- 32GB supports up to 20,000 users
- 64GB supports up to 40,000 users
## Storage
### Storage
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.
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.
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.
......@@ -80,7 +83,7 @@ If you have enough RAM memory and a recent CPU the speed of GitLab is mainly lim
If you want to run the database separately, the **recommended** database size is **1 MB per user**
# Supported webbrowsers
## Supported webbrowsers
- Chrome (Latest stable version)
- Firefox (Latest released version)
......
# GitLab Integration
GitLab integrates with multiple third-party services to allow external issue trackers and external authentication.
See the documentation below for details on how to configure these services.
+ [External issue tracker](external-issue-tracker.md) Redmine, JIRA, etc.
+ [LDAP](ldap.md) Set up sign in via LDAP
+ [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, and Google via OAuth.
+ [Slack](slack.md) Integrate with the Slack chat service
- [External issue tracker](external-issue-tracker.md) Redmine, JIRA, etc.
- [LDAP](ldap.md) Set up sign in via LDAP
- [OmniAuth](omniauth.md) Sign in via Twitter, GitHub, and Google via OAuth.
- [Slack](slack.md) Integrate with the Slack chat service
Jenkins support is [available in GitLab EE](http://doc.gitlab.com/ee/integration/jenkins.html).
# External issue tracker
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:
- the 'Issues' link on the GitLab project pages takes you to the appropriate JIRA issue index;
......
......@@ -2,18 +2,24 @@
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.
1. Sign in to GitHub.
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.
3. Select "Applications" in the left menu.
4. Select "Register new application".
5. Provide the required details.
* Application name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or something else descriptive.
* Homepage URL: The URL to your GitLab installation. 'https://gitlab.company.com'
* Application description: Fill this in if you wish.
* Authorization callback URL: 'https://gitlab.company.com/users/auth/github/callback'
6. Select "Register application".
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)
8. On your GitLab server, open the configuration file.
1. Sign in to GitHub.
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.
1. Select "Applications" in the left menu.
1. Select "Register new application".
1. Provide the required details.
- Application name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or something else descriptive.
- Homepage URL: The URL to your GitLab installation. 'https://gitlab.company.com'
- Application description: Fill this in if you wish.
- Authorization callback URL: 'https://gitlab.company.com/users/auth/github/callback'
1. Select "Register application".
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)
1. On your GitLab server, open the configuration file.
```sh
cd /home/git/gitlab
......@@ -21,8 +27,9 @@ To enable the GitHub OmniAuth provider you must register your application with G
sudo -u git -H editor config/gitlab.yml
```
9. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.
10. Under `providers:` uncomment (or add) lines that look like the following:
1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.
1. Under `providers:` uncomment (or add) lines that look like the following:
```
- { name: 'github', app_id: 'YOUR APP ID',
......@@ -30,9 +37,12 @@ To enable the GitHub OmniAuth provider you must register your application with G
args: { scope: 'user:email' } }
```
11. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
12. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
13. Save the configuration file.
14. Restart GitLab for the changes to take effect.
1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
1. Save the configuration file.
1. Restart GitLab for the changes to take effect.
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.
......@@ -2,28 +2,38 @@
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.
1. Sign in to the [Google Developers Console](https://console.developers.google.com/) with the Google account you want to use to register GitLab.
2. Select "Create Project".
3. Provide the project information
* Project name: 'GitLab' works just fine here.
* 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.
4. Refresh the page. You should now see your new project in the list. Click on the project.
5. Select "APIs & auth" in the left menu.
6. Select "Credentials" in the submenu.
7. Select "Create New Client ID".
8. Fill in the required information
* Application type: "Web Application"
* Authorized JavaScript origins: This isn't really used by GitLab but go ahead and put 'https://gitlab.example.com' here.
* Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback'
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)
10. On your GitLab server, open the configuration file.
1. Sign in to the [Google Developers Console](https://console.developers.google.com/) with the Google account you want to use to register GitLab.
1. Select "Create Project".
1. Provide the project information
- Project name: 'GitLab' works just fine here.
- 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.
1. Refresh the page. You should now see your new project in the list. Click on the project.
1. Select "APIs & auth" in the left menu.
1. Select "Credentials" in the submenu.
1. Select "Create New Client ID".
1. Fill in the required information
- Application type: "Web Application"
- Authorized JavaScript origins: This isn't really used by GitLab but go ahead and put 'https://gitlab.example.com' here.
- Authorized redirect URI: 'https://gitlab.example.com/users/auth/google_oauth2/callback'
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)
1. On your GitLab server, open the configuration file.
```sh
cd /home/git/gitlab
sudo -u git -H editor config/gitlab.yml
```
11. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.
12. Under `providers:` uncomment (or add) lines that look like the following:
1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration) for more details.
1. Under `providers:` uncomment (or add) lines that look like the following:
```
- { name: 'google_oauth2', app_id: 'YOUR APP ID',
......@@ -31,10 +41,13 @@ To enable the Google OAuth2 OmniAuth provider you must register your application
args: { access_type: 'offline', approval_prompt: '' } }
```
13. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
14. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
15. Save the configuration file.
16. Restart GitLab for the changes to take effect.
1. Change 'YOUR APP ID' to the client ID from the GitHub application page from step 7.
1. Change 'YOUR APP SECRET' to the client secret from the GitHub application page from step 7.
1. Save the configuration file.
1. Restart GitLab for the changes to take effect.
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.
......@@ -45,5 +58,5 @@ This further configuration is not required for Google authentication to function
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.
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).
2. Scroll down until you find "Product Name". Change the product name to something more descriptive.
3. Add any additional information as you wish - homepage, logo, privacy policy, etc. None of this is required, but it may help your users.
1. Scroll down until you find "Product Name". Change the product name to something more descriptive.
1. Add any additional information as you wish - homepage, logo, privacy policy, etc. None of this is required, but it may help your users.
# GitLab LDAP integration
GitLab can be configured to allow your users to sign with their LDAP credentials to integrate with e.g. Active Directory.
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.
GitLab user attributes such as nickname and email will be copied from the LDAP user entry.
## Enabling LDAP sign-in for existing GitLab users
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.
If the LDAP email attribute is not found in GitLab's database, a new user is created.
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.
GitLab recognizes the following LDAP attributes as email addresses: `mail`, `email` and `userPrincipalName`.
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`.
# OmniAuth
GitLab leverages OmniAuth to allow users to sign in using Twitter, GitHub, and other popular services. Configuring
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.
+ [Initial OmniAuth Configuration](#initial-omniauth-configuration)
+ [Supported Providers](#supported-providers)
+ [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
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.
### Initial OmniAuth Configuration
- [Initial OmniAuth Configuration](#initial-omniauth-configuration)
- [Supported Providers](#supported-providers)
- [Enable OmniAuth for an Existing User](#enable-omniauth-for-an-existing-user)
## Initial OmniAuth Configuration
Before configuring individual OmniAuth providers there are a few global settings that need to be verified.
1. Open the configuration file<br />
1. Open the configuration file.
```sh
cd /home/git/gitlab
......@@ -20,7 +20,7 @@ Before configuring individual OmniAuth providers there are a few global settings
sudo -u git -H editor config/gitlab.yml
```
2. Find the section dealing with OmniAuth. The section will look similar to the following.<br />
1. Find the section dealing with OmniAuth. The section will look similar to the following.
```
## OmniAuth settings
......@@ -52,32 +52,33 @@ Before configuring individual OmniAuth providers there are a few global settings
# args: { scope: 'user:email' } }
```
3. Change `enabled` to `true`.
4. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`.
* `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to
1. Change `enabled` to `true`.
1. Consider the next two configuration options: `allow_single_sign_on` and `block_auto_created_users`.
- `allow_single_sign_on` defaults to `false`. If `false` users must be created manually or they will not be able to
sign in via OmniAuth.
* `block_auto_created_users` defaults to `true`. If `true` auto created users will be blocked by default and will
- `block_auto_created_users` defaults to `true`. If `true` auto created users will be blocked by default and will
have to be unblocked by an administrator before they are able to sign in.
* **Note:** If you set `allow_single_sign_on` to `true` and `block_auto_created_users` to `false` please be aware
- **Note:** If you set `allow_single_sign_on` to `true` and `block_auto_created_users` to `false` please be aware
that any user on the Internet will be able to successfully sign in to your GitLab without administrative approval.
5. Choose one or more of the Supported Providers below to continue configuration.
### Supported Providers
1. Choose one or more of the Supported Providers below to continue configuration.
## Supported Providers
+ [GitHub](github.md)
+ [Google](google.md)
+ [Twitter](twitter.md)
- [GitHub](github.md)
- [Google](google.md)
- [Twitter](twitter.md)
### Enable OmniAuth for an Existing User
## Enable OmniAuth for an Existing User
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.
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.
1. Sign in normally - whether standard sign in, LDAP, or another OmniAuth provider.
2. Go to profile settings (the silhouette icon in the top right corner).
3. Select the "Account" tab.
4. Under "Social Accounts" select the desired OmniAuth provider, such as Twitter.
5. The user will be redirected to the provider. Once the user authorized GitLab they will be redirected back to GitLab.
1. Go to profile settings (the silhouette icon in the top right corner).
1. Select the "Account" tab.
1. Under "Social Accounts" select the desired OmniAuth provider, such as Twitter.
1. The user will be redirected to the provider. Once the user authorized GitLab they will be redirected back to GitLab.
The chosen OmniAuth provider is now active and can be used to sign in to GitLab from then on.
# Slack integration
# Slack integration
### On Slack
## On Slack
To enable Slack integration you must create an Incoming WebHooks integration on Slack;
1. Sign in to [Slack](https://slack.com) (https://YOURSUBDOMAIN.slack.com/services)
2. Click on the Integrations menu at the top of the page.
3. Add a new Integration.
4. Pick Incoming WebHooks
5. Choose the channel name you want to send notifications to, in the Settings section
6. Add Integrations.
* 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".
1. Sign in to [Slack](https://slack.com) (https://YOURSUBDOMAIN.slack.com/services)
1. Click on the Integrations menu at the top of the page.
1. Add a new Integration.
1. Pick Incoming WebHooks
1. Choose the channel name you want to send notifications to, in the Settings section
1. Add Integrations.
- 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".
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.
### On GitLab
## On GitLab
After Slack is ready we need to setup GitLab. Here are the steps to achieve this.
1. Sign in to GitLab
1. Pick the repository you want.
1. Navigate to Settings -> Services -> Slack
1. Fill in your Slack details
1. Sign in to GitLab
2. Pick the repository you want.
3. Navigate to Settings -> Services -> Slack
4. Fill in your Slack details
* Mark as active it
* Type your subdomain's prefix (If your subdomain is https://somedomain.slack.com you only have to type the somedomain)
* Type in the token you got from Slack
* Type in the channel name you want to use (eg. #announcements)
- Mark as active it
- Type your subdomain's prefix (If your subdomain is https://somedomain.slack.com you only have to type the somedomain)
- Type in the token you got from Slack
- Type in the channel name you want to use (eg. #announcements)
Have fun :)
_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._
*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.*
# Twitter OAuth2 OmniAuth Provider
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.
1. Sign in to [Twitter Developers](https://dev.twitter.com/) area.
2. Hover over the avatar in the top right corner and select "My applications."
3. Select "Create new app"
4. Fill in the application details.
* Name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or
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.
1. Sign in to [Twitter Developers](https://dev.twitter.com/) area.
1. Hover over the avatar in the top right corner and select "My applications."
1. Select "Create new app"
1. Fill in the application details.
- Name: This can be anything. Consider something like "\<Organization\>'s GitLab" or "\<Your Name\>'s GitLab" or
something else descriptive.
* Description: Create a description.
* Website: The URL to your GitLab installation. 'https://gitlab.example.com'
* Callback URL: 'https://gitlab.example.com/users/auth/github/callback'
* Agree to the "Rules of the Road."
- Description: Create a description.
- Website: The URL to your GitLab installation. 'https://gitlab.example.com'
- Callback URL: 'https://gitlab.example.com/users/auth/github/callback'
- Agree to the "Rules of the Road."
![Twitter App Details](twitter_app_details.png)
6. Select "Create your Twitter application."
7. Select the "Settings" tab.
8. Underneath the Callback URL check the box next to "Allow this application to be used to Sign in the Twitter."
9. Select "Update settings" at the bottom to save changes.
10. Select the "API Keys" tab.
11. You should now see an API key and API secret (see screenshot). Keep this page open as you continue configuration.
![Twitter app](twitter_app_api_keys.png)
12. On your GitLab server, open the configuration file.
1. Select "Create your Twitter application."
1. Select the "Settings" tab.
1. Underneath the Callback URL check the box next to "Allow this application to be used to Sign in the Twitter."
1. Select "Update settings" at the bottom to save changes.
1. Select the "API Keys" tab.
1. You should now see an API key and API secret (see screenshot). Keep this page open as you continue configuration.
![Twitter app](twitter_app_api_keys.png)
1. On your GitLab server, open the configuration file.
```sh
cd /home/git/gitlab
......@@ -29,19 +39,22 @@ ID and secret key for you to use.
sudo -u git -H editor config/gitlab.yml
```
13. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration)
1. Find the section dealing with OmniAuth. See [Initial OmniAuth Configuration](README.md#initial-omniauth-configuration)
for more details.
14. Under `providers:` uncomment (or add) lines that look like the following:
1. Under `providers:` uncomment (or add) lines that look like the following:
```
- { name: 'twitter', app_id: 'YOUR APP ID',
app_secret: 'YOUR APP SECRET' }
```
15. Change 'YOUR APP ID' to the API key from Twitter page in step 11.
16. Change 'YOUR APP SECRET' to the API secret from the Twitter page in step 11.
17. Save the configuration file.
18. Restart GitLab for the changes to take effect.
1. Change 'YOUR APP ID' to the API key from Twitter page in step 11.
1. Change 'YOUR APP SECRET' to the API secret from the Twitter page in step 11.
1. Save the configuration file.
1. Restart GitLab for the changes to take effect.
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.
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.
+ [Corporate contributor license agreement](corporate_contributor_license_agreement.md)
+ [Individual contributor license agreement](individual_contributor_license_agreement.md)
# Legal
- [Corporate contributor license agreement](corporate_contributor_license_agreement.md)
- [Individual contributor license agreement](individual_contributor_license_agreement.md)
......@@ -2,26 +2,24 @@
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.
1. Definitions.
1. Definitions.
"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.
"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."
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.
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.
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.
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.
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.
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.
5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others).
5. You represent that each of Your Contributions is Your original creation (see section 7 for submissions on behalf of others).
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.
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.
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]".
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]".
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..
---------------------------------------
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..
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.
......@@ -2,26 +2,24 @@
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.
1. Definitions.
1. Definitions.
"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.
"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."
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.
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.
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.
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.
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..
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..
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.
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.
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.
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.
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]".
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]".
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.
---------------------------------------
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.
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.
# Markdown
----------------------------------------------
Table of Contents
=================
----------------------------------------------
## Table of Contents
**[GitLab Flavored Markdown](#gitlab-flavored-markdown-gfm)**
......@@ -21,7 +16,6 @@ Table of Contents
[Special GitLab references](#special-gitlab-references)
**[Standard Markdown](#standard-markdown)**
[Headers](#headers)
......@@ -46,29 +40,24 @@ Table of Contents
**[References](#references)**
----------------------------------------------
## GitLab Flavored Markdown (GFM)
GitLab Flavored Markdown (GFM)
==============================
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.
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.
You can use GFM in
* commit messages
* comments
* wall posts
* issues
* merge requests
* milestones
* wiki pages
- commit messages
- comments
- wall posts
- issues
- merge requests
- milestones
- wiki pages
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.
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.
## Newlines
Newlines
--------
GFM honors the markdown specification in how [paragraphs and line breaks are handled](http://daringfireball.net/projects/markdown/syntax#p).
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
Sugar is sweet
Multiple underscores in words
-----------------------------
## Multiple underscores in words
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.
perform_complicated_task
......@@ -93,10 +82,9 @@ It is not reasonable to italicize just _part_ of a word, especially when you're
perform_complicated_task
do_this_and_do_that_and_another_thing
URL autolinking
---------------
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.
## URL autolinking
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.
http://www.google.com
......@@ -164,8 +152,7 @@ s = "There is no highlighting for this."
But let's throw in a <b>tag</b>.
```
Emoji
-----
## Emoji
Sometimes you want to be :cool: and add some :sparkles: to your :speech_balloon:. Well we have a :gift: for you:
......@@ -187,26 +174,25 @@ If you are :new: to this, don't be :fearful:. You can easily join the emoji :cir
Consult the [Emoji Cheat Sheet](http://www.emoji-cheat-sheet.com/) for a list of all supported emoji codes. :thumbsup:
Special GitLab References
-----
## Special GitLab References
GFM recognized special references.
You can easily reference e.g. a team member, an issue, or a commit within a project.
GFM will turn that reference into a link so you can navigate between them easily.
GFM will recognize the following:
* @foo : for team members
* #123 : for issues
* !123 : for merge requests
* $123 : for snippets
* 1234567 : for commits
* \[file\](path/to/file) : for file references
- @foo : for team members
- #123 : for issues
- !123 : for merge requests
- $123 : for snippets
- 1234567 : for commits
- \[file\](path/to/file) : for file references
----------------------------------
# Standard Markdown
----------------------------------
## Headers
```no-highlight
......@@ -249,12 +235,12 @@ On hover a link to those IDs becomes visible to make it easier to copy the link
The IDs are generated from the content of the header according to the following rules:
1) remove the heading hashes `#` and process the rest of the line as it would be processed if it were not a header
2) from the result, remove all HTML tags, but keep their inner content
3) convert all characters to lowercase
4) convert all characters except `[a-z0-9_-]` into hyphens `-`
5) transform multiple adjacent hyphens into a single hyphen
6) remove trailing and heading hyphens
1. remove the heading hashes `#` and process the rest of the line as it would be processed if it were not a header
2. from the result, remove all HTML tags, but keep their inner content
3. convert all characters to lowercase
4. convert all characters except `[a-z0-9_-]` into hyphens `-`
5. transform multiple adjacent hyphens into a single hyphen
6. remove trailing and heading hyphens
For example:
......@@ -377,8 +363,7 @@ Some text to show that the reference links can follow later.
**Note**
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:
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:
`[I'm a reference-style link][style]`
......@@ -399,9 +384,11 @@ will point the link to `wikis/style` when the link is inside of a wiki markdown
Here's our logo:
Inline-style:
![alt text](/assets/logo-white.png)
Reference-style:
![alt text][logo]
[logo]: /assets/logo-white.png
......@@ -518,10 +505,8 @@ Code above produces next output:
| cell 1 | cell 2 |
| cell 3 | cell 4 |
------------
## References
* This document leveraged heavily from the [Markdown-Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
* The [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown.
* [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown.
- This document leveraged heavily from the [Markdown-Cheatsheet](https://github.com/adam-p/markdown-here/wiki/Markdown-Cheatsheet).
- The [Markdown Syntax Guide](http://daringfireball.net/projects/markdown/syntax) at Daring Fireball is an excellent resource for a detailed explanation of standard markdown.
- [Dillinger.io](http://dillinger.io) is a handy tool for testing standard markdown.
# Permissions
Users have different abilities depending on the access level they have in a particular group or project.
If a user is both in a project group and in the project itself, the highest permission level is used.
If a user is a GitLab administrator they receive all permissions.
---
#### Project:
| Action| Guest | Reporter | Developer | Master | Owner|
|-------|-------|----------|-----------|--------|------|
|Create new issue|✓|✓|✓|✓|✓|
|Leave comments|✓|✓|✓|✓|✓|
|Write on project wall|✓|✓|✓|✓|✓|
|Pull project code| |✓|✓|✓|✓|
|Download project| |✓|✓|✓|✓|
|Create code snippets| |✓|✓|✓|✓|
|Create new merge request| ||✓|✓|✓|
|Create new branches| ||✓|✓|✓|
|Push to non-protected branches| ||✓|✓|✓|
|Remove non-protected branches| ||✓|✓|✓|
|Add tags| ||✓|✓|✓|
|Write a wiki| ||✓|✓|✓|
|Manage issue tracker| ||✓|✓|✓|
|Add new team members| |||✓|✓|
|Push to protected branches| |||✓|✓|
|Enable/Disable branch protection| |||✓|✓|
|Rewrite/remove git tags| |||✓|✓|
|Edit project| |||✓|✓|
|Add Deploy Keys to project| |||✓|✓|
|Configure Project Hooks| |||✓|✓|
|Switch visibility level| ||||✓|
|Transfer project to another namespace| ||||✓|
|Remove project| ||||✓|
#### Group
|Action|Guest|Reporter|Developer|Master|Owner|
|------|-----|--------|---------|------|-----|
|Browse group|✓|✓|✓|✓|✓|
|Edit group|||||✓|
|Create project in group||||✓|✓|
|Manage group members|||||✓|
|Remove group|||||✓|
## Project
| Action | Guest | Reporter | Developer | Master | Owner |
|---------------------------------------|---------|------------|-------------|----------|--------|
| Create new issue | ✓ | ✓ | ✓ | ✓ | ✓ |
| Leave comments | ✓ | ✓ | ✓ | ✓ | ✓ |
| Write on project wall | ✓ | ✓ | ✓ | ✓ | ✓ |
| Pull project code | | ✓ | ✓ | ✓ | ✓ |
| Download project | | ✓ | ✓ | ✓ | ✓ |
| Create code snippets | | ✓ | ✓ | ✓ | ✓ |
| Create new merge request | | | ✓ | ✓ | ✓ |
| Create new branches | | | ✓ | ✓ | ✓ |
| Push to non-protected branches | | | ✓ | ✓ | ✓ |
| Remove non-protected branches | | | ✓ | ✓ | ✓ |
| Add tags | | | ✓ | ✓ | ✓ |
| Write a wiki | | | ✓ | ✓ | ✓ |
| Manage issue tracker | | | ✓ | ✓ | ✓ |
| Add new team members | | | | ✓ | ✓ |
| Push to protected branches | | | | ✓ | ✓ |
| Enable/Disable branch protection | | | | ✓ | ✓ |
| Rewrite/remove git tags | | | | ✓ | ✓ |
| Edit project | | | | ✓ | ✓ |
| Add Deploy Keys to project | | | | ✓ | ✓ |
| Configure Project Hooks | | | | ✓ | ✓ |
| Switch visibility level | | | | | ✓ |
| Transfer project to another namespace | | | | | ✓ |
| Remove project | | | | | ✓ |
## Group
| Action | Guest | Reporter | Developer | Master | Owner |
|-------------------------|-------|----------|-----------|--------|-------|
| Browse group | ✓ | ✓ | ✓ | ✓ | ✓ |
| Edit group | | | | | ✓ |
| Create project in group | | | | ✓ | ✓ |
| Manage group members | | | | | ✓ |
| Remove group | | | | | ✓ |
Any user can remove himself from a group, unless he is the last Owner of the group.
# Public access
Gitlab allows you to open selected projects to be accessed **publicly** or **internally**.
Projects with either of these visibility levels will be listen in the [public access directory](/public).
Internal projects will only be available to authenticated users.
#### Public projects
## Public projects
Public projects can be cloned **without any** authentication.
It will also be listed on the [public access directory](/public).
**Any logged in user** will have [Guest](/help/permissions) permissions on the repository.
#### Internal projects
## Internal projects
Internal projects can be cloned by any logged in user.
It will also be listed on the [public access directory](/public) for logged in users.
Any logged in user will have [Guest](/help/permissions) permissions on the repository.
#### How to change project visibility
## How to change project visibility
1. Go to your project dashboard
2. Click on the "Edit" tab
3. Change "Visibility Level"
1. Click on the "Edit" tab
1. Change "Visibility Level"
## Visibility of users
#### Visibility of users
The public page of users, located at `/u/username` is visible if either:
* You are logged in.
* You are logged out, and the target user is authorized to (is Guest, Reporter, etc.) at least one public project.
- You are logged in.
- You are logged out, and the target user is authorized to (is Guest, Reporter, etc.) at least one public project.
Otherwise, you will be redirected to the sign in page.
When visiting the public page of an user, you will only see listed projects which you can view yourself.
#### Restricting the use of public or internal projects
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.
## Restricting the use of public or internal projects
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.
+ [Backup restore](backup_restore.md)
+ [Cleanup](cleanup.md)
+ [Maintenance](maintenance.md) and self-checks
+ [User management](user_management.md)
+ [Web hooks](web_hooks.md)
+ [Import](import.md) of git repositories in bulk
- [Backup restore](backup_restore.md)
- [Cleanup](cleanup.md)
- [Maintenance](maintenance.md) and self-checks
- [User management](user_management.md)
- [Web hooks](web_hooks.md)
- [Import](import.md) of git repositories in bulk
# Backup restore
### Create a backup of the GitLab system
## Create a backup of the GitLab system
Creates a backup archive of the database and all repositories. This archive will be saved in backup_path (see `config/gitlab.yml`).
The filename will be `[TIMESTAMP]_gitlab_backup.tar`. This timestamp can be used to restore an specific backup.
```
......@@ -38,7 +39,7 @@ Deleting tmp directories...[DONE]
Deleting old backups... [SKIPPING]
```
### Restore a previously created backup
## Restore a previously created backup
```
bundle exec rake gitlab:backup:restore RAILS_ENV=production
......@@ -81,7 +82,7 @@ Restoring repositories:
Deleting tmp directories...[DONE]
```
### Configure cron to make daily backups
## Configure cron to make daily backups
```
cd /home/git/gitlab
......
# Cleanup
### Remove garbage from filesystem. Important! Data loss!
## Remove garbage from filesystem. Important! Data loss!
Remove namespaces(dirs) from `/home/git/repositories` if they don't exist in GitLab database.
......@@ -13,4 +13,3 @@ Remove repositories (global only for now) from `/home/git/repositories` if they
```
bundle exec rake gitlab:cleanup:repos RAILS_ENV=production
```
# Features
## Enable usernames and namespaces for user projects
This command will enable the namespaces feature introduced in v4.0. It will move every project in its namespace folder.
Note:
- Because the **repository location will change**, you will need to **update all your git url's** to point to the new location.
- Username can be changed at [Profile / Account](/profile/account)
**Example:**
Old path: `git@example.org:myrepo.git`
New path: `git@example.org:username/myrepo.git` or `git@example.org:groupname/myrepo.git`
```
bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
```
## Rebuild project satellites
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**.
```
bundle exec rake gitlab:satellites:create RAILS_ENV=production
```
Example output:
```
Creating satellite for abcd.git
[git clone output]
Creating satellite for abcd2.git
[git clone output]
done
```
# Maintenance
### Gather information about GitLab and the system it runs on
## Gather information about GitLab and the system it runs on
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.
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.
```
bundle exec rake gitlab:env:info RAILS_ENV=production
......@@ -39,15 +38,14 @@ Hooks: /home/git/gitlab-shell/hooks/
Git: /usr/bin/git
```
### Check GitLab configuration
## Check GitLab configuration
Runs the following rake tasks:
* gitlab:env:check
* gitlab:gitlab_shell:check
* gitlab:sidekiq:check
* gitlab:app:check
- `gitlab:env:check`
- `gitlab:gitlab_shell:check`
- `gitlab:sidekiq:check`
- `gitlab:app:check`
It will check that each component was setup according to the installation guide and suggest fixes for issues found.
......@@ -103,10 +101,10 @@ Redis version >= 2.0.0? ... yes
Checking GitLab ... Finished
```
### (Re-)Create satellite repos
## (Re-)Create satellite repos
This will create satellite repos for all your projects.
If necessary, remove the `tmp/repo_satellites` directory and rerun the command below.
```
......
# User management
### Add user as a developer to all projects
## Add user as a developer to all projects
```bash
bundle exec rake gitlab:import:user_to_projects[username@domain.tld]
```
### Add all users to all projects
## Add all users to all projects
Notes:
* admin users are added as masters
- admin users are added as masters
```bash
bundle exec rake gitlab:import:all_users_to_all_projects
```
### Add user as a developer to all groups
## Add user as a developer to all groups
```
```bash
bundle exec rake gitlab:import:user_to_groups[username@domain.tld]
```
### Add all users to all groups
## Add all users to all groups
Notes:
* admin users are added as owners so they can add additional users to the group
- admin users are added as owners so they can add additional users to the group
```
```bash
bundle exec rake gitlab:import:all_users_to_all_groups
```
# Web hooks
### Add a web hook for **ALL** projects:
## Add a web hook for **ALL** projects:
RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook"
### Add a web hook for projects in a given **NAMESPACE**:
## Add a web hook for projects in a given **NAMESPACE**:
RAILS_ENV=production bundle exec rake gitlab:web_hook:add URL="http://example.com/hook" NAMESPACE=acme
### Remove a web hook from **ALL** projects using:
## Remove a web hook from **ALL** projects using:
RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook"
### Remove a web hook from projects in a given **NAMESPACE**:
## Remove a web hook from projects in a given **NAMESPACE**:
RAILS_ENV=production bundle exec rake gitlab:web_hook:rm URL="http://example.com/hook" NAMESPACE=acme
### List **ALL** web hooks:
## List **ALL** web hooks:
RAILS_ENV=production bundle exec rake gitlab:web_hook:list
### List the web hooks from projects in a given **NAMESPACE**:
## List the web hooks from projects in a given **NAMESPACE**:
RAILS_ENV=production bundle exec rake gitlab:web_hook:list NAMESPACE=/
> Note: `/` is the global namespace.
GitLab has the following updates:
+ [Monthly release](monthly.md), every month on the 22nd.
+ [Patch release](patch.md), if there are serious regressions.
+ [Security](security.md), for security problems.
+ [Master](master.md), update process for the master branch.
- [Monthly release](monthly.md), every month on the 22nd.
- [Patch release](patch.md), if there are serious regressions.
- [Security](security.md), for security problems.
- [Master](master.md), update process for the master branch.
......@@ -25,16 +25,18 @@ Consider naming the issue "Release x.x.x.rc1" to make it easier for later search
### **2. Update the installation guide**
1. Check if it references the correct branch `x-x-stable` (doesn't exist yet, but that is okay)
2. Check the [GitLab Shell version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L782)
3. Check the [Git version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L794)
4. There might be other changes. Ask around.
1. Check the [GitLab Shell version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L782)
1. Check the [Git version](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/lib/tasks/gitlab/check.rake#L794)
1. There might be other changes. Ask around.
### **3. Create an update guide**
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.
#### 0. Any major changes?
List any major changes here, so the user is aware of them before starting to upgrade. For instance:
List any major changes here, so the user is aware of them before starting to upgrade. For instance:
- Database updates
- Web server changes
- File structure changes
......@@ -59,42 +61,43 @@ List any major changes here, so the user is aware of them before starting to upg
Check if any of these changed since last release:
* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/lib/support/nginx/gitlab
* https://gitlab.com/gitlab-org/gitlab-shell/commits/master/config.yml.example
* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/gitlab.yml.example
* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/unicorn.rb.example
* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.mysql
* https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.postgresql
- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/lib/support/nginx/gitlab>
- <https://gitlab.com/gitlab-org/gitlab-shell/commits/master/config.yml.example>
- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/gitlab.yml.example>
- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/unicorn.rb.example>
- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.mysql>
- <https://gitlab.com/gitlab-org/gitlab-ce/commits/master/config/database.yml.postgresql>
#### 8. Need to update init script?
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
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>
#### 9. Start application
#### 10. Check application status
### **4. Code quality indicatiors**
### **4. Code quality indicators**
Make sure the code quality indicators are green / good.
* [![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)
- [![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)
* [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://travis-ci.org/gitlabhq/gitlabhq) on travis-ci.org (master branch)
- [![build status](https://secure.travis-ci.org/gitlabhq/gitlabhq.png)](https://travis-ci.org/gitlabhq/gitlabhq) on travis-ci.org (master branch)
* [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
- [![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.png)](https://codeclimate.com/github/gitlabhq/gitlabhq)
* [![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)
- [![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)
* [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
- [![Coverage Status](https://coveralls.io/repos/gitlabhq/gitlabhq/badge.png?branch=master)](https://coveralls.io/r/gitlabhq/gitlabhq)
### **5. Set VERSION**
Change version in VERSION to x.x.0.rc1
Change version in VERSION to `x.x.0.rc1`.
### **6. Tag**
Create an annotated tag that points to the version change commit.
Create an annotated tag that points to the version change commit:
```
git tag -a vx.x.0.rc1 -m 'Version x.x.0.rc1'
```
......@@ -105,6 +108,7 @@ Tweet about the RC release:
> GitLab x.x.x.rc1 is out. This is a release candidate intended for testing only. Please let us know if you find regressions.
n
### **8. Update GitLab.com**
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
### **1. Prepare the blog post**
* 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.
* Create a WIP MR for the blog post and cc the team so everyone can give feedback.
* Ask Dmitriy to add screenshots to the WIP MR.
* Decide with team who will be the MVP user.
* 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.
- 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.
- Create a WIP MR for the blog post and cc the team so everyone can give feedback.
- Ask Dmitriy to add screenshots to the WIP MR.
- Decide with team who will be the MVP user.
- 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.
### **2. Q&A**
Create issue on dev.gitlab.org gitlab repository, named "GitLab X.X release" in order to keep track of the progress.
Create issue on dev.gitlab.org `gitlab` repository, named "GitLab X.X release" in order to keep track of the progress.
Use the omnibus packages of Enterprise Edition using [this guide](https://dev.gitlab.org/gitlab/gitlab-ee/blob/master/doc/release/manual_testing.md).
**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.
### **3. Fix anything coming out of the QA**
Create an issue with description of a problem, if it is quick fix fix yourself otherwise contact the team for advice.
# **22nd - Release CE and EE**
For GitLab EE, append -ee to the branches and tags.
For GitLab EE, append `-ee` to the branches and tags.
`x-x-stable-ee`
......@@ -152,25 +155,24 @@ git push <remote> x-x-stable
```
### **2. Build the Omnibus packages**
[Follow this guide](https://gitlab.com/gitlab-org/omnibus-gitlab/blob/master/doc/release.md)
### **3. Set VERSION to x.x.x and push**
Change the VERSION file in `master` branch of the CE repository and commit.
Cherry-pick into the `x-x-stable` branch of CE.
Change the VERSION file in `master` branch of the CE repository and commit. Cherry-pick into the `x-x-stable` branch of CE.
Change the VERSION file in `master branch of the EE repository and commit.
Cherry-pick into the `x-x-stable-ee` branch of EE.
Change the VERSION file in `master` branch of the EE repository and commit. Cherry-pick into the `x-x-stable-ee` branch of EE.
### **4. Create annotated tag vx.x.x**
In `x-x-stable` branch check for the sha1 of the commit with VERSION file changed. Tag that commit,
In `x-x-stable` branch check for the SHA-1 of the commit with VERSION file changed. Tag that commit,
```
git tag -a vx.x.0 -m 'Version x.x.0' xxxxx
```
where `xxxxx` is sha1.
where `xxxxx` is SHA-1.
### **5. Push the tag**
......@@ -200,7 +202,7 @@ Proposed tweet for EE "GitLab X.X.X EE is released! It brings *** <link-to-blogp
### **9. Send out newsletter**
In mailchimp replicate the former release newsletters to customers / newsletter subscribers (these are two separate things) and modify them accordingly.
In MailChimp replicate the former release newsletters to customers / newsletter subscribers (these are two separate things) and modify them accordingly.
Include a link to the blog post and keep it short.
......
......@@ -4,12 +4,13 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab
## When to do a patch release
Do a patch release when there is a critical regression that needs to be adresses before the next monthly release.
Do a patch release when there is a critical regression that needs to be addresses before the next monthly release.
Otherwise include it in the monthly release and note there was a regression fix in the release announcement.
## Release Procedure
1. Verify that the issue can be repoduced
1. Verify that the issue can be reproduced
1. Note in the 'GitLab X.X regressions' that you will create a patch
1. Create an issue on private GitLab development server
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
1. Apply the patch to GitLab Cloud and the private GitLab development server
1. Build new packages with the latest version
1. Cherry-pick the changelog update back into master
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
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
1. Note in the 'GitLab X.X regressions' issue that the patch was published
......@@ -4,46 +4,48 @@ NOTE: This is a guide for GitLab developers. If you are trying to install GitLab
## When to do a security release
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.
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.
## Security vulnerability disclosure
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.
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.
## Release Procedure
1. Verify that the issue can be repoduced
1. Verify that the issue can be reproduced
1. Acknowledge the issue to the researcher that disclosed it
1. Do the steps from [patch release document](doc/release/patch.md), starting with "Create an issue on private GitLab development server"
1. Create feature branches for the blog post on GitLab.com and link them from the code branch
1. Merge and publish the blog posts
1. Send tweets about the release from @gitlabhq
1. Send tweets about the release from `@gitlabhq`
1. Send out an email to the subscribers mailing list on MailChimp
1. Send out an email to [the community google mailing list](https://groups.google.com/forum/#!forum/gitlabhq)
1. Send out an email to [the GitLab newsletter list](http://gitlab.us5.list-manage.com/subscribe?u=498dccd07cf3e9482bee33ba4&id=98a9a4992c)
1. Post a signed copy of our complete announcement to [oss-security](http://www.openwall.com/lists/oss-security/) and request a CVE number
1. Add the security researcher to the [Security Researcher Acknowledgments list](http://www.gitlab.com/vulnerability-acknowledgements/)
1. Thank the security researcher in an email for their cooperation
1. Update the blogpost and the CHANGELOG when we receive the CVE number
1. Update the blog post and the CHANGELOG when we receive the CVE number
The timing of the code merge into master should be coordinated in advance.
After the merge we strive to publish the announcements within 60 minutes.
## Blog post template
XXX Security Advisory for GitLab
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.
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.
### Version affected
GitLab Community Edition XXX and lower
GitLab Enterprise Edition XXX and lower
### Fixed versions
GitLab Community Edition XXX and up
GitLab Enterprise Edition XXX and up
### Impact
......
+ [Password length limits](password_length_limits.md)
+ [Rack attack](rack_attack.md)
# Security
- [Password length limits](password_length_limits.md)
- [Rack attack](rack_attack.md)
# Custom password length limits
If you want to enforce longer user passwords you can create an extra Devise initializer with the steps below.
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`.
```bash
......
# Rack attack
To prevent abusive clients doing damage GitLab uses rack-attack gem.
If you installed or upgraded GitLab by following the official guides this should be enabled by default.
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:
1. In config/application.rb find and uncomment the following line:
config.middleware.use Rack::Attack
2. Rename config/initializers/rack_attack.rb.example to config/initializers/rack_attack.rb
3. Review the paths_to_be_protected and add any other path you need protecting
4. Restart GitLab instance
1. In config/application.rb find and uncomment the following line:
config.middleware.use Rack::Attack
1. Rename `config/initializers/rack_attack.rb.example` to `config/initializers/rack_attack.rb`.
1. Review the `paths_to_be_protected` and add any other path you need protecting.
1. Restart GitLab instance.
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`
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`
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.
......
+ [Deploy keys](deploy_keys.md)
+ [SSH](ssh.md)
# SSH
- [Deploy keys](deploy_keys.md)
- [SSH](ssh.md)
......@@ -2,13 +2,8 @@
Deploy keys allow read-only access one or multiple projects with a single SSH key.
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.
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.
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.
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.
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.
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.
......@@ -2,13 +2,9 @@
SSH key allows you to establish a secure connection between your computer and GitLab
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.
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.
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.
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.
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.
Note that the password you choose here can't be altered or retrieved.
......@@ -22,5 +18,4 @@ Use the code below to show your public key.
cat ~/.ssh/id_rsa.pub
```
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.
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.
......@@ -4,7 +4,7 @@ Your GitLab instance can perform HTTP POST requests on the following events: `cr
System hooks can be used, e.g. for logging or changing information in a LDAP server.
#### Hooks request example:
## Hooks request example
**Project created:**
......@@ -73,23 +73,23 @@ System hooks can be used, e.g. for logging or changing information in a LDAP ser
**User created:**
```json
{
{
"created_at": "2012-07-21T07:44:07Z",
"email": "js@gitlabhq.com",
"event_name": "user_create",
"name": "John Smith",
"user_id": 41
"name": "John Smith",
"user_id": 41
}
```
**User removed:**
```json
{
{
"created_at": "2012-07-21T07:44:07Z",
"email": "js@gitlabhq.com",
"event_name": "user_destroy",
"name": "John Smith",
"user_id": 41
"user_id": 41
}
```
# From 2.6 to 3.0
### 1. Stop server & resque
## 1. Stop server & resque
sudo service gitlab stop
### 2. Update code & db
## 2. Update code & db
```bash
......@@ -54,10 +54,8 @@ sudo -u git -H sed -i "s/\(GIT_CONFIG_KEYS\s*=>*\s*\).\{2\}/\\1'\.\*'/g" /home/g
# Check app status
sudo -u gitlab bundle exec rake gitlab:app:status RAILS_ENV=production
```
### 3. Start all
## 3. Start all
sudo service gitlab start
# From 2.9 to 3.0
### 1. Stop server & resque
## 1. Stop server & resque
sudo service gitlab stop
### 2. Follow instructions
## 2. Follow instructions
```bash
......@@ -31,7 +31,6 @@ sudo -u git -H sed -i 's/\(GL_GITCONFIG_KEYS\s*=>*\s*\).\{2\}/\\1"\.\*"/g' /home
sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
```
### 3. Start all
## 3. Start all
sudo service gitlab start
# From 3.0 to 3.1
__IMPORTANT!__
**IMPORTANT!**
In this release __we moved Resque jobs under own gitlab namespace__.
In this release **we moved Resque jobs under own gitlab namespace**
Despite a lot of advantages it requires from our users to __replace gitolite post-receive hook with new one__.
Despite a lot of advantages it requires from our users to **replace gitolite post-receive hook with new one**.
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.
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.
I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you
- - -
### 1. Stop server & resque
## 1. Stop server & resque
sudo service gitlab stop
### 2. Update GitLab
## 2. Update GitLab
```bash
# Get latest code
sudo -u gitlab -H git fetch
sudo -u gitlab -H git checkout v3.1.0
......@@ -35,12 +31,11 @@ sudo -u gitlab -H bundle install --without development test postgres sqlite
# Migrate db
sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
```
### 3. Update post-receive hooks
## 3. Update post-receive hooks
#### Gitolite 3
### Gitolite 3
Step 1: Rewrite post-receive hook
......@@ -60,7 +55,7 @@ sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
sudo -u git -H lib/support/rewrite-hooks.sh
```
#### Gitolite v2
### Gitolite v2
Step 1: rewrite post-receive hook for gitolite 2
......@@ -71,7 +66,6 @@ sudo chown git:git /home/git/share/gitolite/hooks/common/post-receive
Step 2: Replace symlinks in project to valid place
#!/bin/bash
src="/home/git/repositories"
for dir in `ls "$src/"`
......@@ -90,19 +84,13 @@ Step 2: Replace symlinks in project to valid place
fi
done
### 4. Check app status
## 4. Check app status
```bash
# Check APP Status
sudo -u gitlab -H bundle exec rake gitlab:app:status RAILS_ENV=production
```
### 5. Start all
## 5. Start all
sudo service gitlab start
......@@ -2,25 +2,22 @@
## Important changes
* Support for SQLite was dropped
* Support for gitolite 2 was dropped
* Projects are organized in namespaces
* The GitLab post-receive hook needs to be updated
* The configuration file needs to be updated
* Availability of `python2` executable
- Support for SQLite was dropped
- Support for Gitolite 2 was dropped
- Projects are organized in namespaces
- The GitLab post-receive hook needs to be updated
- The configuration file needs to be updated
- Availability of `python2` executable
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.
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.
I wrote a bash script which will do it automatically for you. Just make sure all path inside is valid for you
- - -
### 1. Stop GitLab & Resque
## 1. Stop GitLab & Resque
sudo service gitlab stop
### 2. Update GitLab
## 2. Update GitLab
```bash
......@@ -43,8 +40,7 @@ sudo -u gitlab -H bundle exec rake gitlab:enable_namespaces RAILS_ENV=production
```
### 3. Update post-receive hooks (Requires gitolite v3 )
## 3. Update post-receive hooks (Requires Gitolite v3 )
Step 1: Rewrite post-receive hook
......@@ -63,9 +59,7 @@ sudo -u gitlab -H vim lib/support/rewrite-hooks.sh
sudo -u git -H lib/support/rewrite-hooks.sh
```
### 4. Replace config with new one
## 4. Replace config with new one
# backup old one
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
# edit it
sudo -u gitlab -H vim config/gitlab.yml
### 5. Disable ssh known_host check for own domain
## 5. Disable ssh known_host check for own domain
echo "Host localhost
StrictHostKeyChecking no
......@@ -88,12 +80,10 @@ sudo -u git -H lib/support/rewrite-hooks.sh
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null" | sudo tee -a /etc/ssh/ssh_config
### 6. Check GitLab's status
## 6. Check GitLab's status
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
### 7. Start GitLab & Resque
## 7. Start GitLab & Resque
sudo service gitlab start
......@@ -2,18 +2,16 @@
## Important changes
* Resque replaced with Sidekiq
* New options for configuration file added
* Init.d script should be updated
* __requires ruby1.9.3-p327__
- Resque replaced with Sidekiq
- New options for configuration file added
- Init.d script should be updated
- **requires ruby1.9.3-p327**
- - -
### 1. Stop GitLab & Resque
## 1. Stop GitLab & Resque
sudo service gitlab stop
### 2. Update GitLab
## 2. Update GitLab
```bash
# Set the working directory
......@@ -31,7 +29,7 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
```
### 3. Replace init.d script with a new one
## 3. Replace init.d script with a new one
```
# backup old one
......@@ -43,15 +41,15 @@ sudo chmod +x /etc/init.d/gitlab
```
### 4. Check GitLab's status
## 4. Check GitLab's status
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
### 5. Start GitLab & Sidekiq
## 5. Start GitLab & Sidekiq
sudo service gitlab start
### 6. Remove old init.d script
## 6. Remove old init.d script
sudo rm /etc/init.d/gitlab.old
# From 4.1 to 4.2
### 1. Stop server & resque
## 1. Stop server & Resque
sudo service gitlab stop
### 2. Update code & db
## 2. Update code & DB
```bash
......@@ -24,15 +24,12 @@ sudo -u gitlab -H bundle exec rake db:migrate RAILS_ENV=production
```
### 3. Check GitLab's status
## 3. Check GitLab's status
```bash
sudo -u gitlab -H bundle exec rake gitlab:check RAILS_ENV=production
```
### 4. Start all
## 4. Start all
sudo service gitlab start
# From 4.2 to 5.0
## Warning
GitLab 5.0 is affected by critical security vulnerability CVE-2013-4490.
## Important changes
* We don't use `gitlab` user any more. Everything will be moved to `git` user
* __requires ruby1.9.3__
- We don't use `gitlab` user any more. Everything will be moved to `git` user
- **requires ruby1.9.3**
__0. Stop gitlab__
## 0. Stop gitlab
sudo service gitlab stop
__1. add bash to git user__
## 1. add bash to git user
```
sudo chsh -s /bin/bash git
```
__2. git clone gitlab-shell__
## 2. git clone gitlab-shell
```
cd /home/git/
sudo -u git -H git clone https://github.com/gitlabhq/gitlab-shell.git /home/git/gitlab-shell
```
__3. setup gitlab-shell__
## 3. setup gitlab-shell
```bash
# chmod all repos and files under git
......@@ -55,7 +55,7 @@ ruby -v
exit
```
__4. Copy gitlab instance to git user__
## 4. Copy gitlab instance to git user
```bash
sudo cp -R /home/gitlab/gitlab /home/git/gitlab
......@@ -66,7 +66,7 @@ sudo rm -rf /home/gitlab/gitlab-satellites
sudo rm /tmp/gitlab.socket
```
__5. Update gitlab to recent version__
## 5. Update gitlab to recent version
```bash
cd /home/git/gitlab
......@@ -110,7 +110,7 @@ sudo chmod -R u+rwX /home/git/gitlab/tmp/pids
```
__6. Update init.d script and nginx config__
## 6. Update init.d script and nginx config
```bash
# init.d
......@@ -127,14 +127,11 @@ sudo -u git -H cp /home/git/gitlab/config/unicorn.rb.example /home/git/gitlab/co
sudo vim /etc/nginx/sites-enabled/gitlab
sudo service nginx restart
```
__7. Start gitlab instance__
## 7. Start GitLab instance
```
sudo service gitlab start
# check if unicorn and sidekiq started
......@@ -145,7 +142,7 @@ ps aux | grep sidekiq
```
__8. Check installation__
## 8. Check installation
```bash
......@@ -164,5 +161,4 @@ sudo -u git -H bundle exec rake gitlab:check RAILS_ENV=production
```
__P.S. If everything works as expected you can remove gitlab user from system__
**P.S. If everything works as expected you can remove gitlab user from system**
# From 5.0 to 5.1
## Warning
GitLab 5.1 is affected by critical security vulnerability CVE-2013-4490.
## Release notes:
## Release notes
* `unicorn` replaced with `puma`
* merge request cached diff will be truncated
- `unicorn` replaced with `puma`
- merge request cached diff will be truncated
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -20,7 +21,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 5-1-stable
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -33,8 +34,7 @@ sudo -u git -H cp config.yml.example config.yml
sudo -u git -H vi config.yml
```
### 4. Install libs, migrations etc
## 4. Install libs, migrations etc
```bash
cd /home/git/gitlab
......@@ -47,7 +47,7 @@ sudo -u git -H bundle exec rake migrate_merge_requests RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 5. Update init.d script with a new one
## 5. Update init.d script with a new one
```bash
# init.d
......@@ -56,9 +56,9 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlab-rec
sudo chmod +x /etc/init.d/gitlab
```
### 6. Mysql grant privileges
## 6. MySQL grant privileges
Only if you are using mysql:
Only if you are using MySQL:
```bash
mysql -u root -p
......@@ -66,6 +66,6 @@ mysql> GRANT LOCK TABLES ON `gitlabhq_production`.* TO 'gitlab'@'localhost';
mysql> \q
```
### 7. Start application
## 7. Start application
sudo service gitlab start
# From 5.1 to 5.2
## Warning
GitLab 5.2 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
### 0. Backup
## 0. Backup
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)
......@@ -13,11 +14,11 @@ cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -25,7 +26,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 5-2-stable
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -33,7 +34,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.4.0
```
### 4. Install libs, migrations, etc.
## 4. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -49,12 +50,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 5. Update config files
## 5. Update config files
* 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.
* 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.
- 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.
- 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.
### 6. Update Init script
## 6. Update Init script
```bash
cd /home/git/gitlab
......@@ -63,7 +64,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 7. Create uploads directory
## 7. Create uploads directory
```bash
cd /home/git/gitlab
......@@ -71,12 +72,12 @@ sudo -u git -H mkdir public/uploads
sudo chmod -R u+rwX public/uploads
```
### 8. Start application
## 8. Start application
sudo service gitlab start
sudo service nginx restart
### 9. Check application status
## 9. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -91,10 +92,10 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (5.1)
### 1. Revert the code to the previous version
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)
### 2. Restore from the backup:
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).
### 2. Restore from the backup
```bash
cd /home/git/gitlab
......
# From 5.1 to 5.4
Also works starting from 5.2.
### 0. Backup
## 0. Backup
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)
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):
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -23,7 +23,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 5-4-stable # Latest version of 5-4-stable addresses CVE-2013-4489
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -31,7 +31,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
```
### 4. Install libs, migrations, etc.
## 4. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -47,12 +47,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 5. Update config files
## 5. Update config files
* 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.
* 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.
- 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.
- 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.
### 6. Update Init script
## 6. Update Init script
```bash
sudo rm /etc/init.d/gitlab
......@@ -60,7 +60,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 7. Create uploads directory
## 7. Create uploads directory
```bash
cd /home/git/gitlab
......@@ -68,13 +68,12 @@ sudo -u git -H mkdir public/uploads
sudo chmod -R u+rwX public/uploads
```
### 8. Start application
## 8. Start application
sudo service gitlab start
sudo service nginx restart
### 9. Check application status
## 9. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -89,8 +88,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (5.3)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......
# From 5.1 to 6.0
## Warning
GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
### Deprecations
## Deprecations
#### Global projects
### Global projects
The root (global) namespace for projects is deprecated.
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.
#### Teams
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.
### Teams
We introduce group membership in 6.0 as a replacement for teams.
The old combination of groups and teams was confusing for a lot of people.
And when the members of a team where changed this wasn't reflected in the project permissions.
In GitLab 6.0 you will be able to add members to a group with a permission level for each member.
These group members will have access to the projects in that group.
Any changes to group members will immediately be reflected in the project permissions.
You can even have multiple owners for a group, greatly simplifying administration.
### 0. Backup
## 0. Backup
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)
......@@ -30,11 +38,11 @@ cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -42,7 +50,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 6-0-stable
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -50,14 +58,14 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9
```
### 4. Install additional packages
## 4. Install additional packages
```bash
# For reStructuredText markup language support install required package:
sudo apt-get install python-docutils
```
### 5. Install libs, migrations, etc.
## 5. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -83,14 +91,14 @@ sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 6. Update config files
## 6. Update config files
Note: We switched from Puma in GitLab 5.x to unicorn in GitLab 6.0.
* 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.
* 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.
- 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.
- 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.
### 7. Update Init script
## 7. Update Init script
```bash
cd /home/git/gitlab
......@@ -99,7 +107,7 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 8. Create uploads directory
## 8. Create uploads directory
```bash
cd /home/git/gitlab
......@@ -107,12 +115,12 @@ sudo -u git -H mkdir -p public/uploads
sudo chmod -R u+rwX public/uploads
```
### 9. Start application
## 9. Start application
sudo service gitlab start
sudo service nginx restart
### 10. Check application status
## 10. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -127,8 +135,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (5.1)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......@@ -137,20 +145,24 @@ cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
```
### Troubleshooting
## Troubleshooting
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.
All project owners should have an owner
All project owners should have an owner:
```
Project.all.select { |project| project.owner.blank? }
```
Every user should have a namespace
Every user should have a namespace:
```
User.all.select { |u| u.namespace.blank? }
```
Projects in the global namespace should not conflict with projects in the owner namespace
Projects in the global namespace should not conflict with projects in the owner namespace:
```
Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? }
```
# From 5.2 to 5.3
## Warning
GitLab 5.3 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
### 0. Backup
## 0. Backup
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)
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):
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -25,7 +25,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 5-3-stable
```
### 3. Install libs, migrations, etc.
## 3. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -41,12 +41,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 4. Update config files
## 4. Update config files
* 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.
* 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.
- 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.
- 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.
### 5. Update Init script
## 5. Update Init script
```bash
sudo rm /etc/init.d/gitlab
......@@ -54,12 +54,12 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5
sudo chmod +x /etc/init.d/gitlab
```
### 6. Start application
## 6. Start application
sudo service gitlab start
sudo service nginx restart
### 7. Check application status
## 7. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -74,8 +74,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (5.2)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......
# From 5.3 to 5.4
### 0. Backup
## 0. Backup
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)
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):
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -22,7 +21,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 5-4-stable # Latest version of 5-4-stable addresses CVE-2013-4489
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -30,7 +29,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
```
### 4. Install libs, migrations, etc.
## 4. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -46,12 +45,12 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 5. Update config files
## 5. Update config files
* 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.
* 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.
- 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.
- 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.
### 6. Update Init script
## 6. Update Init script
```bash
sudo rm /etc/init.d/gitlab
......@@ -59,12 +58,12 @@ sudo curl --output /etc/init.d/gitlab https://raw.github.com/gitlabhq/gitlabhq/5
sudo chmod +x /etc/init.d/gitlab
```
### 7. Start application
## 7. Start application
sudo service gitlab start
sudo service nginx restart
### 8. Check application status
## 8. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -79,8 +78,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (5.3)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......
# From 5.4 to 6.0
## Warning
GitLab 6.0 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
### Deprecations
## Deprecations
#### Global projects
### Global projects
The root (global) namespace for projects is deprecated.
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.
#### Teams
### Teams
We introduce group membership in 6.0 as a replacement for teams.
The old combination of groups and teams was confusing for a lot of people.
And when the members of a team where changed this wasn't reflected in the project permissions.
In GitLab 6.0 you will be able to add members to a group with a permission level for each member.
These group members will have access to the projects in that group.
Any changes to group members will immediately be reflected in the project permissions.
You can even have multiple owners for a group, greatly simplifying administration.
### 0. Backup
## 0. Backup
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)
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):
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -42,7 +49,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout 6-0-stable
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -50,14 +57,14 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9
```
### 4. Install additional packages
## 4. Install additional packages
```bash
# For reStructuredText markup language support install required package:
sudo apt-get install python-docutils
```
### 5. Install libs, migrations, etc.
## 5. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -83,14 +90,14 @@ sudo -u git -H bundle exec rake assets:clean RAILS_ENV=production
sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
```
### 6. Update config files
## 6. Update config files
Note: We switched from Puma in GitLab 5.4 to unicorn in GitLab 6.0.
* 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.
* 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.
- 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.
- 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.
### 7. Update Init script
## 7. Update Init script
```bash
sudo rm /etc/init.d/gitlab
......@@ -98,12 +105,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 8. Start application
## 8. Start application
sudo service gitlab start
sudo service nginx restart
### 9. Check application status
## 9. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -115,20 +122,24 @@ To make sure you didn't miss anything run a more thorough check with:
If all items are green, then congratulations upgrade complete!
### Troubleshooting
## Troubleshooting
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.
All project owners should have an owner
All project owners should have an owner:
```
Project.all.select { |project| project.owner.blank? }
```
Every user should have a namespace
Every user should have a namespace:
```
User.all.select { |u| u.namespace.blank? }
```
Projects in the global namespace should not conflict with projects in the owner namespace
Projects in the global namespace should not conflict with projects in the owner namespace:
```
Project.where(namespace_id: nil).select { |p| Project.where(path: p.path, namespace_id: p.owner.try(:namespace).try(:id)).present? }
```
# From 6.0 to 6.1
## Warning
GitLab 6.1 is affected by critical security vulnerabilities CVE-2013-4490 and CVE-2013-4489.
# In 6.1 we remove a lot of deprecated code.
# You should update to 6.0 before installing 6.1 so all the necessary conversions are run.
**In 6.1 we remove a lot of deprecated code.**
**You should update to 6.0 before installing 6.1 so all the necessary conversions are run.**
### Deprecations
## Deprecations
#### Global issue numbers
### Global issue numbers
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.
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.
### 0. Backup
## 0. Backup
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)
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):
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -35,7 +36,7 @@ sudo -u git -H git checkout 6-1-stable
# For GitLab Enterprise Edition: sudo -u git -H git checkout 6-1-stable-ee
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -43,7 +44,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9
```
### 4. Install libs, migrations, etc.
## 4. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -62,12 +63,12 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
```
### 5. Update config files
## 5. Update config files
* 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.
* 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.
- 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.
- 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.
### 6. Update Init script
## 6. Update Init script
```bash
sudo rm /etc/init.d/gitlab
......@@ -75,12 +76,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 7. Start application
## 7. Start application
sudo service gitlab start
sudo service nginx restart
### 8. Check application status
## 8. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -96,8 +97,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (6.0)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......
# From 6.0 to 6.8
# In 6.1 we remove a lot of deprecated code.
# You should update to 6.0 before installing 6.1 or higher so all the necessary conversions are run.
**In 6.1 we remove a lot of deprecated code.**
### Deprecations
**You should update to 6.0 before installing 6.1 or higher so all the necessary conversions are run.**
#### Global issue numbers
## Deprecations
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.
## Global issue numbers
### 0. Backup
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.
## 0. Backup
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,18 +20,18 @@ cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
sudo -u git -H git fetch --all
```
For Gitlab Community Edition:
For GitLab Community Edition:
```bash
sudo -u git -H git checkout 6-8-stable
......@@ -45,14 +46,14 @@ sudo -u git -H git checkout 6-8-stable-ee
```
### 3. Install additional packages
## 3. Install additional packages
```bash
# Add support for lograte for better log file handling
sudo apt-get install logrotate
```
### 4. Update gitlab-shell
## 4. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -60,7 +61,7 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.9.3 # Addresses multiple critical security vulnerabilities
```
### 5. Install libs, migrations, etc.
## 5. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -85,7 +86,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS
sudo chmod u+rwx,g+rx,o-rwx /home/git/gitlab-satellites
```
### 6. Update config files
## 6. Update config files
TIP: to see what changed in gitlab.yml.example in this release use next command:
......@@ -108,18 +109,18 @@ sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers
sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
```
### 7. Update Init script
## 7. Update Init script
```bash
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
```
### 8. Start application
## 8. Start application
sudo service gitlab start
sudo service nginx restart
### 9. Check application status
## 9. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -135,8 +136,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (6.0)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......@@ -146,4 +147,5 @@ sudo -u git -H bundle exec rake gitlab:backup:restore RAILS_ENV=production
```
## Login issues after upgrade?
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)
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)
# From 6.1 to 6.2
# You should update to 6.1 before installing 6.2 so all the necessary conversions are run.
**You should update to 6.1 before installing 6.2 so all the necessary conversions are run.**
### 0. Backup
## 0. Backup
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)
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).
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -25,7 +24,7 @@ sudo -u git -H git checkout 6-2-stable # Latest version of 6-2-stable addresses
# For GitLab Enterprise Edition: sudo -u git -H git checkout 6-2-stable-ee
```
### 3. Update gitlab-shell
## 3. Update gitlab-shell
```bash
cd /home/git/gitlab-shell
......@@ -33,14 +32,14 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
```
### 4. Install additional packages
## 4. Install additional packages
```bash
# Add support for lograte for better log file handling
sudo apt-get install logrotate
```
### 5. Install libs, migrations, etc.
## 5. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -58,29 +57,33 @@ sudo -u git -H bundle exec rake assets:precompile RAILS_ENV=production
sudo -u git -H bundle exec rake cache:clear RAILS_ENV=production
```
### 6. Update config files
## 6. Update config files
TIP: to see what changed in gitlab.yml.example in this release use next command:
TIP: to see what changed in `gitlab.yml.example` in this release use next command:
```
git diff 6-1-stable:config/gitlab.yml.example 6-2-stable:config/gitlab.yml.example
```
* 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.
* 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.
* Copy rack attack middleware config
- 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.
```bash
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
```
* Uncomment `config.middleware.use Rack::Attack` in `/home/git/gitlab/config/application.rb`
* Set up logrotate
- 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.
- Copy rack attack middleware config:
```bash
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
```
- Uncomment `config.middleware.use Rack::Attack` in `/home/git/gitlab/config/application.rb`
- Set up logrotate.
```bash
sudo cp lib/support/logrotate/gitlab /etc/logrotate.d/gitlab
```
### 7. Update Init script
## 7. Update Init script
```bash
sudo rm /etc/init.d/gitlab
......@@ -88,12 +91,12 @@ sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 8. Start application
## 8. Start application
sudo service gitlab start
sudo service nginx restart
### 9. Check application status
## 9. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -108,8 +111,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (6.1)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......
# From 6.2 to 6.3
## Requires version: 6.1 or 6.2
**Requires version: 6.1 or 6.2.**
### 0. Backup
## 0. Backup
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)
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)
```bash
cd /home/git/gitlab
sudo -u git -H bundle exec rake gitlab:backup:create RAILS_ENV=production
```
### 1. Stop server
## 1. Stop server
sudo service gitlab stop
### 2. Get latest code
## 2. Get latest code
```bash
cd /home/git/gitlab
......@@ -25,7 +24,7 @@ sudo -u git -H git checkout 6-3-stable
# For GitLab Enterprise Edition: sudo -u git -H git checkout 6-3-stable-ee
```
### 3. Update gitlab-shell (and its config)
## 3. Update gitlab-shell (and its config)
```bash
cd /home/git/gitlab-shell
......@@ -33,9 +32,9 @@ sudo -u git -H git fetch
sudo -u git -H git checkout v1.7.9 # Addresses multiple critical security vulnerabilities
```
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
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>
### 4. Install libs, migrations, etc.
## 4. Install libs, migrations, etc.
```bash
cd /home/git/gitlab
......@@ -54,7 +53,7 @@ sudo -u git -H bundle exec rake db:migrate RAILS_ENV=production
sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS_ENV=production
```
### 5. Update config files
## 5. Update config files
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:
git diff 6-2-stable:config/gitlab.yml.example 6-3-stable:config/gitlab.yml.example
```
* 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.
* 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.
- 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.
- 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.
```bash
# Copy rack attack middleware config
......@@ -71,19 +70,19 @@ cd /home/git/gitlab
sudo -u git -H cp config/initializers/rack_attack.rb.example config/initializers/rack_attack.rb
```
### 6. Update Init script
## 6. Update Init script
```bash
sudo cp lib/support/init.d/gitlab /etc/init.d/gitlab
sudo chmod +x /etc/init.d/gitlab
```
### 7. Start application
## 7. Start application
sudo service gitlab start
sudo service nginx restart
### 8. Check application status
## 8. Check application status
Check if GitLab and its environment are configured correctly:
......@@ -98,8 +97,8 @@ If all items are green, then congratulations upgrade complete!
## Things went south? Revert to previous version (6.2)
### 1. Revert the code to the previous version
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)
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).
### 2. Restore from the backup:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
+ [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update)
+ [Upgrader](upgrader.md)
+ [Ruby](ruby.md)
+ [Patch versions](patch_versions.md)
+ [MySQL to PostgreSQL](mysql_to_postgresql.md)
- [The individual upgrade guides](https://gitlab.com/gitlab-org/gitlab-ce/tree/master/doc/update)
- [Upgrader](upgrader.md)
- [Ruby](ruby.md)
- [Patch versions](patch_versions.md)
- [MySQL to PostgreSQL](mysql_to_postgresql.md)
This diff is collapsed.
# 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/).
# 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/).
### 0. Backup
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment