Commit 3ee810cf authored by Marcel Amirault's avatar Marcel Amirault

Merge branch '20200320-aqualls-codeblocks' into 'master'

Declare languages for code blocks

See merge request gitlab-org/gitlab!27727
parents c6b8b1f5 cc5e05e2
...@@ -37,7 +37,7 @@ sudo gitlab-ctl restart ...@@ -37,7 +37,7 @@ sudo gitlab-ctl restart
The output should be similar to this: The output should be similar to this:
``` ```plaintext
ok: run: gitlab-workhorse: (pid 11291) 1s ok: run: gitlab-workhorse: (pid 11291) 1s
ok: run: logrotate: (pid 11299) 0s ok: run: logrotate: (pid 11299) 0s
ok: run: mailroom: (pid 11306) 0s ok: run: mailroom: (pid 11306) 0s
...@@ -103,13 +103,13 @@ depend on those files. ...@@ -103,13 +103,13 @@ depend on those files.
If you have followed the official installation guide to [install GitLab from If you have followed the official installation guide to [install GitLab from
source][install], run the following command to restart GitLab: source][install], run the following command to restart GitLab:
``` ```shell
sudo service gitlab restart sudo service gitlab restart
``` ```
The output should be similar to this: The output should be similar to this:
``` ```plaintext
Shutting down GitLab Unicorn Shutting down GitLab Unicorn
Shutting down GitLab Sidekiq Shutting down GitLab Sidekiq
Shutting down GitLab Workhorse Shutting down GitLab Workhorse
......
...@@ -25,7 +25,7 @@ the `SIDEKIQ_LOG_ARGUMENTS` [environment variable](https://docs.gitlab.com/omnib ...@@ -25,7 +25,7 @@ the `SIDEKIQ_LOG_ARGUMENTS` [environment variable](https://docs.gitlab.com/omnib
Example: Example:
``` ```ruby
gitlab_rails['env'] = {"SIDEKIQ_LOG_ARGUMENTS" => "1"} gitlab_rails['env'] = {"SIDEKIQ_LOG_ARGUMENTS" => "1"}
``` ```
...@@ -43,7 +43,7 @@ single argument containing the string `"..."`. ...@@ -43,7 +43,7 @@ single argument containing the string `"..."`.
Send the Sidekiq process ID the `TTIN` signal and it will output thread Send the Sidekiq process ID the `TTIN` signal and it will output thread
backtraces in the log file. backtraces in the log file.
``` ```shell
kill -TTIN <sidekiq_pid> kill -TTIN <sidekiq_pid>
``` ```
...@@ -95,7 +95,7 @@ sudo perf record -p <sidekiq_pid> ...@@ -95,7 +95,7 @@ sudo perf record -p <sidekiq_pid>
Let this run for 30-60 seconds and then press Ctrl-C. Then view the perf report: Let this run for 30-60 seconds and then press Ctrl-C. Then view the perf report:
```shell ```shell
sudo perf report $ sudo perf report
# Sample output # Sample output
Samples: 348K of event 'cycles', Event count (approx.): 280908431073 Samples: 348K of event 'cycles', Event count (approx.): 280908431073
......
...@@ -21,7 +21,7 @@ The `JenkinsService` and `GithubService` classes are only available in the Enter ...@@ -21,7 +21,7 @@ The `JenkinsService` and `GithubService` classes are only available in the Enter
so if you downgrade to the Community Edition, you'll come across the following so if you downgrade to the Community Edition, you'll come across the following
error: error:
``` ```plaintext
Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms) Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms)
ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'JenkinsService'. This ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'JenkinsService'. This
...@@ -32,7 +32,7 @@ use another column for that information.) ...@@ -32,7 +32,7 @@ use another column for that information.)
or or
``` ```plaintext
Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms) Completed 500 Internal Server Error in 497ms (ActiveRecord: 32.2ms)
ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'GithubService'. This ActionView::Template::Error (The single-table inheritance mechanism failed to locate the subclass: 'GithubService'. This
......
...@@ -43,7 +43,7 @@ The list below is not exhaustive, but contains many of the most commonly used co ...@@ -43,7 +43,7 @@ The list below is not exhaustive, but contains many of the most commonly used co
To create a text file from the command line, for example `README.md`, follow these To create a text file from the command line, for example `README.md`, follow these
steps: steps:
``` ```shell
touch README.md touch README.md
nano README.md nano README.md
#### ADD YOUR INFORMATION #### ADD YOUR INFORMATION
...@@ -59,14 +59,14 @@ It is easy to delete (remove) a file or directory, but be careful: ...@@ -59,14 +59,14 @@ It is easy to delete (remove) a file or directory, but be careful:
DANGER: **Danger:** DANGER: **Danger:**
This will **permanently** delete a file. This will **permanently** delete a file.
``` ```shell
rm NAME-OF-FILE rm NAME-OF-FILE
``` ```
DANGER: **Danger:** DANGER: **Danger:**
This will **permanently** delete a directory and **all** of its contents. This will **permanently** delete a directory and **all** of its contents.
``` ```shell
rm -r NAME-OF-DIRECTORY rm -r NAME-OF-DIRECTORY
``` ```
...@@ -77,14 +77,14 @@ and then execute any of them again, if needed. ...@@ -77,14 +77,14 @@ and then execute any of them again, if needed.
First, list the commands you executed previously: First, list the commands you executed previously:
``` ```shell
history history
``` ```
Then, choose a command from the list and check the number next to the command (`123`, Then, choose a command from the list and check the number next to the command (`123`,
for example) . Execute the same full command with: for example) . Execute the same full command with:
``` ```shell
!123 !123
``` ```
...@@ -95,7 +95,7 @@ need administrator's rights to execute commands that affect the system, or try t ...@@ -95,7 +95,7 @@ need administrator's rights to execute commands that affect the system, or try t
protected data, for example. You can use `sudo` to execute these commands, but you protected data, for example. You can use `sudo` to execute these commands, but you
will likely be asked for an administrator password. will likely be asked for an administrator password.
``` ```shell
sudo RESTRICTED-COMMAND sudo RESTRICTED-COMMAND
``` ```
......
...@@ -376,7 +376,7 @@ terminal window: ...@@ -376,7 +376,7 @@ terminal window:
Once the update process has completed, you'll see a message like this: Once the update process has completed, you'll see a message like this:
``` ```plaintext
Upgrade complete! If your GitLab server is misbehaving try running Upgrade complete! If your GitLab server is misbehaving try running
sudo gitlab-ctl restart sudo gitlab-ctl restart
......
...@@ -90,14 +90,14 @@ here's how you configure GitLab to be aware of the change: ...@@ -90,14 +90,14 @@ here's how you configure GitLab to be aware of the change:
1. Edit the config file of Omnibus GitLab using your favorite text editor: 1. Edit the config file of Omnibus GitLab using your favorite text editor:
``` ```shell
sudo vim /etc/gitlab/gitlab.rb sudo vim /etc/gitlab/gitlab.rb
``` ```
1. Set the `external_url` value to the domain name you wish GitLab to have 1. Set the `external_url` value to the domain name you wish GitLab to have
**without** `https`: **without** `https`:
``` ```ruby
external_url 'http://gitlab.example.com' external_url 'http://gitlab.example.com'
``` ```
...@@ -105,7 +105,7 @@ here's how you configure GitLab to be aware of the change: ...@@ -105,7 +105,7 @@ here's how you configure GitLab to be aware of the change:
1. Reconfigure GitLab for the changes to take effect: 1. Reconfigure GitLab for the changes to take effect:
``` ```shell
sudo gitlab-ctl reconfigure sudo gitlab-ctl reconfigure
``` ```
......
...@@ -47,7 +47,7 @@ If the highest number stable branch is unclear, check the [GitLab blog](https:// ...@@ -47,7 +47,7 @@ If the highest number stable branch is unclear, check the [GitLab blog](https://
This is the main directory structure you will end up with following the instructions This is the main directory structure you will end up with following the instructions
of this page: of this page:
``` ```plaintext
|-- home |-- home
| |-- git | |-- git
| |-- .ssh | |-- .ssh
...@@ -147,7 +147,7 @@ ldd /usr/local/bin/git | grep pcre2 ...@@ -147,7 +147,7 @@ ldd /usr/local/bin/git | grep pcre2
The output should be similar to: The output should be similar to:
``` ```plaintext
libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f08461c3000) libpcre2-8.so.0 => /usr/lib/libpcre2-8.so.0 (0x00007f08461c3000)
``` ```
...@@ -904,7 +904,7 @@ for the changes to take effect. ...@@ -904,7 +904,7 @@ for the changes to take effect.
If you'd like to connect to a Redis server on a non-standard port or a different host, you can configure its connection string via the `config/resque.yml` file. If you'd like to connect to a Redis server on a non-standard port or a different host, you can configure its connection string via the `config/resque.yml` file.
``` ```yaml
# example # example
production: production:
url: redis://redis.example.tld:6379 url: redis://redis.example.tld:6379
...@@ -912,7 +912,7 @@ production: ...@@ -912,7 +912,7 @@ production:
If you want to connect the Redis server via socket, use the "unix:" URL scheme and the path to the Redis socket file in the `config/resque.yml` file. If you want to connect the Redis server via socket, use the "unix:" URL scheme and the path to the Redis socket file in the `config/resque.yml` file.
``` ```yaml
# example # example
production: production:
url: unix:/path/to/redis/socket url: unix:/path/to/redis/socket
...@@ -920,7 +920,7 @@ production: ...@@ -920,7 +920,7 @@ production:
Also, you can use environment variables in the `config/resque.yml` file: Also, you can use environment variables in the `config/resque.yml` file:
``` ```yaml
# example # example
production: production:
url: <%= ENV.fetch('GITLAB_REDIS_URL') %> url: <%= ENV.fetch('GITLAB_REDIS_URL') %>
...@@ -930,7 +930,7 @@ production: ...@@ -930,7 +930,7 @@ production:
If you are running SSH on a non-standard port, you must change the GitLab user's SSH config. If you are running SSH on a non-standard port, you must change the GitLab user's SSH config.
``` ```plaintext
# Add to /home/git/.ssh/config # Add to /home/git/.ssh/config
host localhost # Give your setup a name (here: override localhost) host localhost # Give your setup a name (here: override localhost)
user git # Your remote git user user git # Your remote git user
......
...@@ -184,7 +184,7 @@ Sometimes though, you may encounter some issues, like OpenShift not running ...@@ -184,7 +184,7 @@ Sometimes though, you may encounter some issues, like OpenShift not running
when booting up the VM. The web UI may not responding or you may see issues when booting up the VM. The web UI may not responding or you may see issues
when trying to login with `oc`, like: when trying to login with `oc`, like:
``` ```plaintext
The connection to the server 10.2.2.2:8443 was refused - did you specify the right host or port? The connection to the server 10.2.2.2:8443 was refused - did you specify the right host or port?
``` ```
...@@ -403,7 +403,7 @@ Let's see how to do that using the following steps. ...@@ -403,7 +403,7 @@ Let's see how to do that using the following steps.
The output will be similar to: The output will be similar to:
``` ```plaintext
NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE NAME CLUSTER-IP EXTERNAL-IP PORT(S) AGE
gitlab-ce 172.30.243.177 <none> 22/TCP,80/TCP 5d gitlab-ce 172.30.243.177 <none> 22/TCP,80/TCP 5d
gitlab-ce-postgresql 172.30.116.75 <none> 5432/TCP 5d gitlab-ce-postgresql 172.30.116.75 <none> 5432/TCP 5d
...@@ -436,7 +436,7 @@ Let's see how to do that using the following steps. ...@@ -436,7 +436,7 @@ Let's see how to do that using the following steps.
which will return something like: which will return something like:
``` ```plaintext
NAME DESIRED CURRENT AGE NAME DESIRED CURRENT AGE
gitlab-ce-2 2 2 5d gitlab-ce-2 2 2 5d
``` ```
......
...@@ -147,7 +147,7 @@ Users using PostgreSQL must ensure the `pg_trgm` extension is loaded into every ...@@ -147,7 +147,7 @@ Users using PostgreSQL must ensure the `pg_trgm` extension is loaded into every
GitLab database. This extension can be enabled (using a PostgreSQL super user) GitLab database. This extension can be enabled (using a PostgreSQL super user)
by running the following query for every database: by running the following query for every database:
``` ```sql
CREATE EXTENSION pg_trgm; CREATE EXTENSION pg_trgm;
``` ```
...@@ -170,7 +170,7 @@ If you are using [GitLab Geo](../development/geo.md): ...@@ -170,7 +170,7 @@ If you are using [GitLab Geo](../development/geo.md):
[postgres_fdw](https://www.postgresql.org/docs/9.6/postgres-fdw.html) [postgres_fdw](https://www.postgresql.org/docs/9.6/postgres-fdw.html)
extension. extension.
``` ```sql
CREATE EXTENSION postgres_fdw; CREATE EXTENSION postgres_fdw;
``` ```
......
...@@ -67,7 +67,7 @@ To enable the Microsoft Azure OAuth2 OmniAuth provider you must register your ap ...@@ -67,7 +67,7 @@ To enable the Microsoft Azure OAuth2 OmniAuth provider you must register your ap
For installations from source: For installations from source:
``` ```yaml
- { name: 'azure_oauth2', - { name: 'azure_oauth2',
args: { client_id: "CLIENT ID", args: { client_id: "CLIENT ID",
client_secret: "CLIENT SECRET", client_secret: "CLIENT SECRET",
......
...@@ -57,7 +57,7 @@ you to use. ...@@ -57,7 +57,7 @@ you to use.
And grant at least the following permissions: And grant at least the following permissions:
``` ```plaintext
Account: Email, Read Account: Email, Read
Projects: Read Projects: Read
Repositories: Read Repositories: Read
...@@ -77,7 +77,7 @@ you to use. ...@@ -77,7 +77,7 @@ you to use.
1. On your GitLab server, open the configuration file: 1. On your GitLab server, open the configuration file:
``` ```shell
# For Omnibus packages # For Omnibus packages
sudo editor /etc/gitlab/gitlab.rb sudo editor /etc/gitlab/gitlab.rb
......
...@@ -41,7 +41,7 @@ To enable the CAS OmniAuth provider you must register your application with your ...@@ -41,7 +41,7 @@ To enable the CAS OmniAuth provider you must register your application with your
For installations from source: For installations from source:
``` ```yaml
- { name: 'cas3', - { name: 'cas3',
label: 'cas', label: 'cas',
args: { args: {
......
...@@ -563,7 +563,7 @@ Here are some common pitfalls and how to overcome them: ...@@ -563,7 +563,7 @@ Here are some common pitfalls and how to overcome them:
If you enabled Elasticsearch before GitLab 8.12 and have not rebuilt indexes you will get If you enabled Elasticsearch before GitLab 8.12 and have not rebuilt indexes you will get
exception in lots of different cases: exception in lots of different cases:
```text ```plaintext
Elasticsearch::Transport::Transport::Errors::BadRequest([400] { Elasticsearch::Transport::Transport::Errors::BadRequest([400] {
"error": { "error": {
"root_cause": [{ "root_cause": [{
...@@ -587,7 +587,7 @@ Here are some common pitfalls and how to overcome them: ...@@ -587,7 +587,7 @@ Here are some common pitfalls and how to overcome them:
- Exception `Elasticsearch::Transport::Transport::Errors::RequestEntityTooLarge` - Exception `Elasticsearch::Transport::Transport::Errors::RequestEntityTooLarge`
```text ```plaintext
[413] {"Message":"Request size exceeded 10485760 bytes"} [413] {"Message":"Request size exceeded 10485760 bytes"}
``` ```
...@@ -619,7 +619,7 @@ Here are some common pitfalls and how to overcome them: ...@@ -619,7 +619,7 @@ Here are some common pitfalls and how to overcome them:
- **I'm getting a `health check timeout: no Elasticsearch node available` error in Sidekiq during the indexing process** - **I'm getting a `health check timeout: no Elasticsearch node available` error in Sidekiq during the indexing process**
``` ```plaintext
Gitlab::Elastic::Indexer::Error: time="2020-01-23T09:13:00Z" level=fatal msg="health check timeout: no Elasticsearch node available" Gitlab::Elastic::Indexer::Error: time="2020-01-23T09:13:00Z" level=fatal msg="health check timeout: no Elasticsearch node available"
``` ```
......
...@@ -81,7 +81,7 @@ To enable the Facebook OmniAuth provider you must register your application with ...@@ -81,7 +81,7 @@ To enable the Facebook OmniAuth provider you must register your application with
For installations from source: For installations from source:
``` ```yaml
- { name: 'facebook', app_id: 'YOUR_APP_ID', - { name: 'facebook', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET' } app_secret: 'YOUR_APP_SECRET' }
``` ```
......
...@@ -69,7 +69,7 @@ Follow these steps to incorporate the GitHub OAuth 2 app in your GitLab server: ...@@ -69,7 +69,7 @@ Follow these steps to incorporate the GitHub OAuth 2 app in your GitLab server:
For GitHub.com: For GitHub.com:
``` ```yaml
- { name: 'github', app_id: 'YOUR_APP_ID', - { name: 'github', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET', app_secret: 'YOUR_APP_SECRET',
args: { scope: 'user:email' } } args: { scope: 'user:email' } }
...@@ -77,7 +77,7 @@ Follow these steps to incorporate the GitHub OAuth 2 app in your GitLab server: ...@@ -77,7 +77,7 @@ Follow these steps to incorporate the GitHub OAuth 2 app in your GitLab server:
For GitHub Enterprise: For GitHub Enterprise:
``` ```yaml
- { name: 'github', app_id: 'YOUR_APP_ID', - { name: 'github', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET', app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/", url: "https://github.example.com/",
...@@ -124,7 +124,7 @@ omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"] } ...@@ -124,7 +124,7 @@ omnibus_gitconfig['system'] = { "http" => ["sslVerify = false"] }
For installation from source: For installation from source:
``` ```yaml
- { name: 'github', app_id: 'YOUR_APP_ID', - { name: 'github', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET', app_secret: 'YOUR_APP_SECRET',
url: "https://github.example.com/", url: "https://github.example.com/",
...@@ -134,7 +134,7 @@ For installation from source: ...@@ -134,7 +134,7 @@ For installation from source:
You will also need to disable Git SSL verification on the server hosting GitLab. You will also need to disable Git SSL verification on the server hosting GitLab.
``` ```shell
git config --global http.sslVerify false git config --global http.sslVerify false
``` ```
......
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