diff options
Diffstat (limited to 'doc')
-rw-r--r-- | doc/administration/high_availability/database.md | 4 | ||||
-rw-r--r-- | doc/api/merge_requests.md | 49 | ||||
-rw-r--r-- | doc/project_services/img/mattermost_console_integrations.png | bin | 41186 -> 314642 bytes | |||
-rw-r--r-- | doc/project_services/jira.md | 1 | ||||
-rw-r--r-- | doc/project_services/mattermost_slash_commands.md | 8 | ||||
-rw-r--r-- | doc/ssh/README.md | 197 | ||||
-rw-r--r-- | doc/update/8.14-to-8.15.md | 6 |
7 files changed, 155 insertions, 110 deletions
diff --git a/doc/administration/high_availability/database.md b/doc/administration/high_availability/database.md index 76f3a0fb387..b36cf18d459 100644 --- a/doc/administration/high_availability/database.md +++ b/doc/administration/high_availability/database.md @@ -41,7 +41,7 @@ If you use a cloud-managed service, or provide your own PostgreSQL: mailroom['enable'] = false # PostgreSQL configuration - postgresql['sql_password'] = 'DB password' + gitlab_rails['db_password'] = 'DB password' postgresql['md5_auth_cidr_addresses'] = ['0.0.0.0/0'] postgresql['listen_address'] = '0.0.0.0' ``` @@ -80,7 +80,7 @@ If you use a cloud-managed service, or provide your own PostgreSQL: 1. Similarly, set the password for the `gitlab` database user. Use the same password that you specified in the `/etc/gitlab/gitlab.rb` file for - `postgresql['sql_password']`. + `gitlab_rails['db_password']`. ``` \password gitlab diff --git a/doc/api/merge_requests.md b/doc/api/merge_requests.md index 9460b3f73b1..81df55ab4ab 100644 --- a/doc/api/merge_requests.md +++ b/doc/api/merge_requests.md @@ -271,17 +271,18 @@ Creates a new merge request. 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 -- `description` (optional) - Description of MR -- `target_project_id` (optional) - The target project (numeric id) -- `labels` (optional) - Labels for MR as a comma-separated list -- `milestone_id` (optional) - Milestone ID +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | string | yes | The ID of a project | +| `source_branch` | string | yes | The source branch | +| `target_branch` | string | yes | The target branch | +| `title` | string | yes | Title of MR | +| `assignee_id` | integer | no | Assignee user ID | +| `description` | string | no | Description of MR | +| `target_project_id` | integer | no | The target project (numeric id) | +| `labels` | string | no | Labels for MR as a comma-separated list | +| `milestone_id` | integer | no | The ID of a milestone | +| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging | ```json { @@ -346,17 +347,19 @@ Updates an existing merge request. You can change the target branch, title, or e PUT /projects/:id/merge_requests/:merge_request_id ``` -Parameters: - -- `id` (required) - The ID of a project -- `merge_request_id` (required) - ID of MR -- `target_branch` - The target branch -- `assignee_id` - Assignee user ID -- `title` - Title of MR -- `description` - Description of MR -- `state_event` - New state (close|reopen|merge) -- `labels` (optional) - Labels for MR as a comma-separated list -- `milestone_id` (optional) - Milestone ID +| Attribute | Type | Required | Description | +| --------- | ---- | -------- | ----------- | +| `id` | string | yes | The ID of a project | +| `merge_request_id` | integer | yes | The ID of a merge request | +| `source_branch` | string | yes | The source branch | +| `target_branch` | string | yes | The target branch | +| `title` | string | yes | Title of MR | +| `assignee_id` | integer | no | Assignee user ID | +| `description` | string | no | Description of MR | +| `target_project_id` | integer | no | The target project (numeric id) | +| `labels` | string | no | Labels for MR as a comma-separated list | +| `milestone_id` | integer | no | The ID of a milestone | +| `remove_source_branch` | boolean | no | Flag indicating if a merge request should remove the source branch when merging | ```json { @@ -807,7 +810,7 @@ Example response: ## Create a todo -Manually creates a todo for the current user on a merge request. +Manually creates a todo for the current user on a merge request. If there already exists a todo for the user on that merge request, status code `304` is returned. diff --git a/doc/project_services/img/mattermost_console_integrations.png b/doc/project_services/img/mattermost_console_integrations.png Binary files differindex b3b8c20d7bf..92a30da5be0 100644 --- a/doc/project_services/img/mattermost_console_integrations.png +++ b/doc/project_services/img/mattermost_console_integrations.png diff --git a/doc/project_services/jira.md b/doc/project_services/jira.md index 366e4b2d306..390066c9989 100644 --- a/doc/project_services/jira.md +++ b/doc/project_services/jira.md @@ -197,6 +197,7 @@ incorrectly the JIRA-GitLab integration. Make sure that the user you set up for GitLab to communicate with JIRA has the correct access permission to post comments on a ticket and to also transition the ticket, if you'd like GitLab to also take care of closing them. +JIRA issue references and update comments will not work if the GitLab issue tracker is disabled. ### GitLab is unable to close a ticket diff --git a/doc/project_services/mattermost_slash_commands.md b/doc/project_services/mattermost_slash_commands.md index 1507dfa3abd..6fcbf6f1642 100644 --- a/doc/project_services/mattermost_slash_commands.md +++ b/doc/project_services/mattermost_slash_commands.md @@ -22,6 +22,9 @@ commands in Mattermost and then enable the service in GitLab. ### Step 1. Enable custom slash commands in Mattermost +This step is only required when using a source install, omnibus installs will be +preconfigured with the right settings. + The first thing to do in Mattermost is to enable custom slash commands from the administrator console. @@ -32,8 +35,9 @@ the administrator console. --- -1. Click **Custom integrations** and set **Enable Custom Slash Commands** to - true. +1. Click **Custom integrations** and set **Enable Custom Slash Commands**, + **Enable custom integrations to override usernames**, and **Override + custom integrations to override profile picture icons** to true ![Mattermost console](img/mattermost_console_integrations.png) diff --git a/doc/ssh/README.md b/doc/ssh/README.md index d6a0979f6ec..9803937fcf9 100644 --- a/doc/ssh/README.md +++ b/doc/ssh/README.md @@ -1,75 +1,141 @@ # SSH -## SSH keys +Git is a distributed version control system, which means you can work locally +but you can also share or "push" your changes to other servers. +Before you can push your changes to a GitLab server +you need a secure communication channel for sharing information. +GitLab uses Public-key or asymmetric cryptography +which encrypts a communication channel by locking it with your "private key" +and allows trusted parties to unlock it with your "public key". +If someone does not have your public key they cannot access the unencrypted message. -An SSH key allows you to establish a secure connection between your -computer and GitLab. Before generating an SSH key in your shell, check if your system -already has one by running the following command: +## Locating an existing SSH key pair + +Before generating a new SSH key check if your system already has one +at the default location by opening a shell, or Command Prompt on Windows, +and running the following command: + +**Windows Command Prompt:** -**Windows Command Line:** ```bash type %userprofile%\.ssh\id_rsa.pub ``` -**GNU/Linux/Mac/PowerShell:** + +**GNU/Linux / macOS / PowerShell:** + ```bash cat ~/.ssh/id_rsa.pub ``` -If you see a long string starting with `ssh-rsa`, you can skip the `ssh-keygen` step. +If you see a string starting with `ssh-rsa` you already have an SSH key pair +and you can skip the next step **Generating a new SSH key pair** +and continue onto **Copying your public SSH key to the clipboard**. +If you don't see the string or would like to generate a SSH key pair with a +custom name continue onto the next step. -To generate a new SSH key, use the following command: -```bash -ssh-keygen -t rsa -C "$your_email" -``` -This command will prompt you for a location and filename to store the key -pair and for a password. When prompted for the location and filename, just -press enter to use the default. If you use a different name, the key will not -be used automatically. +## Generating a new SSH key pair -Note: 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. +1. To generate a new SSH key, use the following command: -If you want to change the password of your key later, you can use the following -command: `ssh-keygen -p <keyname>` + **GNU/Linux / macOS:** -Use the command below to show your public key: + ```bash + ssh-keygen -t rsa -C "GitLab" -b 4096 + ``` -**Windows Command Line:** -```bash -type %userprofile%\.ssh\id_rsa.pub -``` -**GNU/Linux/Mac/PowerShell:** -```bash -cat ~/.ssh/id_rsa.pub -``` + **Windows:** -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-rsa` and ending -with your username and host. + On Windows you will need to download + [PuttyGen](http://www.chiark.greenend.org.uk/~sgtatham/putty/download.html) + and follow this [documentation article][winputty] to generate a SSH key pair. -To copy your public key to the clipboard, use the code below. Depending on your -OS you'll need to use a different command: +1. Next, you will be prompted to input a file path to save your key pair to. -**Windows Command Line:** -```bash -type %userprofile%\.ssh\id_rsa.pub | clip -``` + If you don't already have an SSH key pair use the suggested path by pressing + enter. Using the suggested path will allow your SSH client + to automatically use the key pair with no additional configuration. -**Windows PowerShell:** -```bash -cat ~/.ssh/id_rsa.pub | clip -``` + If you already have a key pair with the suggested file path, you will need + to input a new file path and declare what host this key pair will be used + for in your `.ssh/config` file, see **Working with non-default SSH key pair paths** + for more information. + +1. Once you have input a file path you will be prompted to input a password to + secure your SSH key pair. It is a best practice to use a password for an SSH + key pair, but it is not required and you can skip creating a password by + pressing enter. + + >**Note:** + If you want to change the password of your key, you can use `ssh-keygen -p <keyname>`. + +1. The next step is to copy the public key as we will need it afterwards. + + To copy your public key to the clipboard, use the appropriate code for your + operating system below: + + **macOS:** + + ```bash + pbcopy < ~/.ssh/id_rsa.pub + ``` + + **GNU/Linux (requires the xclip package):** + + ```bash + xclip -sel clip < ~/.ssh/id_rsa.pub + ``` + + **Windows Command Line:** + + ```bash + type %userprofile%\.ssh\id_rsa.pub | clip + ``` + + **Windows PowerShell:** + + ```bash + cat ~/.ssh/id_rsa.pub | clip + ``` + +1. The final step is to add your public SSH key to GitLab. + + Navigate to the 'SSH Keys' tab in you 'Profile Settings'. + Paste your key in the 'Key' section and give it a relevant 'Title'. + Use an identifiable title like 'Work Laptop - Windows 7' or + 'Home MacBook Pro 15'. + + If you manually copied your public SSH key make sure you copied the entire + key starting with `ssh-rsa` and ending with your email. + +## Working with non-default SSH key pair paths + +If you used a non-default file path for your GitLab SSH key pair, +you must configure your SSH client to find your GitLab SSH private key +for connections to your GitLab server (perhaps gitlab.com). + +For OpenSSH clients this is configured in the `~/.ssh/config` file. +Below are two example host configurations using their own key: -**Mac:** -```bash -pbcopy < ~/.ssh/id_rsa.pub ``` +# GitLab.com server +Host gitlab.com +RSAAuthentication yes +IdentityFile ~/.ssh/config/private-key-filename-01 -**GNU/Linux (requires xclip):** -```bash -xclip -sel clip < ~/.ssh/id_rsa.pub +# Private GitLab server +Host gitlab.company.com +RSAAuthentication yes +IdentityFile ~/.ssh/config/private-key-filename ``` +Due to the wide variety of SSH clients and their very large number of +configuration options, further explanation of these topics is beyond the scope +of this document. + +Public SSH keys need to be unique, as they will bind to your account. +Your SSH key is the only identifier you'll have when pushing code via SSH. +That's why it needs to uniquely map to a single user. + ## Deploy keys Deploy keys allow read-only access to multiple projects with a single SSH @@ -89,10 +155,10 @@ 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. +a group. -Deploy keys can be shared between projects, you just need to add them to each project. +Deploy keys can be shared between projects, you just need to add them to each +project. ## Applications @@ -100,33 +166,4 @@ Deploy keys can be shared between projects, you just need to add them to each pr How to add your ssh key to Eclipse: https://wiki.eclipse.org/EGit/User_Guide#Eclipse_SSH_Configuration -## Tip: Non-default OpenSSH key file names or locations - -If, for whatever reason, you decide to specify a non-default location and filename for your GitLab SSH key pair, you must configure your SSH client to find your GitLab SSH private key for connections to your GitLab server (perhaps gitlab.com). For OpenSSH clients, this is handled in the `~/.ssh/config` file with a stanza similar to the following: - -``` -# -# Main gitlab.com server -# -Host gitlab.com -RSAAuthentication yes -IdentityFile ~/my-ssh-key-directory/my-gitlab-private-key-filename -User mygitlabusername -``` - -Another example -``` -# -# Our company's internal GitLab server -# -Host my-gitlab.company.com -RSAAuthentication yes -IdentityFile ~/my-ssh-key-directory/company-com-private-key-filename -``` - -Note in the gitlab.com example above a username was specified to override the default chosen by OpenSSH (your local username). This is only required if your local and remote usernames differ. - -Due to the wide variety of SSH clients and their very large number of configuration options, further explanation of these topics is beyond the scope of this document. - -Public SSH keys need to be unique, as they will bind to your account. Your SSH key is the only identifier you'll -have when pushing code via SSH. That's why it needs to uniquely map to a single user.
\ No newline at end of file +[winputty]: https://the.earth.li/~sgtatham/putty/0.67/htmldoc/Chapter8.html#pubkey-puttygen diff --git a/doc/update/8.14-to-8.15.md b/doc/update/8.14-to-8.15.md index 576b943b98c..3f58493fa63 100644 --- a/doc/update/8.14-to-8.15.md +++ b/doc/update/8.14-to-8.15.md @@ -113,7 +113,7 @@ sudo -u git -H bundle exec rake assets:clean assets:precompile cache:clear RAILS There are new configuration options available for [`gitlab.yml`](config/gitlab.yml.example). View them with the command below and apply them manually to your current `gitlab.yml`: ```sh -git diff origin/8-13-stable:config/gitlab.yml.example origin/8-15-stable:config/gitlab.yml.example +git diff origin/8-14-stable:config/gitlab.yml.example origin/8-15-stable:config/gitlab.yml.example ``` #### Git configuration @@ -131,10 +131,10 @@ Ensure you're still up-to-date with the latest NGINX configuration changes: ```sh # For HTTPS configurations -git diff origin/8-13-stable:lib/support/nginx/gitlab-ssl origin/8-15-stable:lib/support/nginx/gitlab-ssl +git diff origin/8-14-stable:lib/support/nginx/gitlab-ssl origin/8-15-stable:lib/support/nginx/gitlab-ssl # For HTTP configurations -git diff origin/8-13-stable:lib/support/nginx/gitlab origin/8-15-stable:lib/support/nginx/gitlab +git diff origin/8-14-stable:lib/support/nginx/gitlab origin/8-15-stable:lib/support/nginx/gitlab ``` If you are using Apache instead of NGINX please see the updated [Apache templates]. |