Skip to content
Snippets Groups Projects
Commit 9b2d5a59 authored by Amy Qualls's avatar Amy Qualls Committed by Marcel Amirault
Browse files

Add languages to code blocks

Another MR to add languages to code blocks.
parent c340258b
No related branches found
No related tags found
No related merge requests found
Showing
with 50 additions and 48 deletions
Loading
Loading
@@ -134,7 +134,7 @@ The **secondary** node authenticates itself via a [JWT request](https://jwt.io/)
When the **secondary** node wishes to download a file, it sends an
HTTP request with the `Authorization` header:
 
```
```plaintext
Authorization: GL-Geo <access_key>:<JWT payload>
```
 
Loading
Loading
@@ -146,7 +146,7 @@ file for the right database ID. For example, for an LFS object, the
request must also include the SHA256 sum of the file. An example JWT
payload looks like:
 
```
```yaml
{ "data": { sha256: "31806bb23580caab78040f8c45d329f5016b0115" }, iat: "1234567890" }
```
 
Loading
Loading
@@ -199,13 +199,13 @@ contains the schema and migrations for this database.
 
To write a migration for the database, use the `GeoMigrationGenerator`:
 
```
```shell
rails g geo_migration [args] [options]
```
 
To migrate the tracking database, run:
 
```
```shell
bundle exec rake geo:db:migrate
```
 
Loading
Loading
@@ -252,7 +252,7 @@ Failure to do this will prevent the **secondary** node from
functioning properly. The **secondary** node will generate error
messages, as the following PostgreSQL error:
 
```
```sql
ERROR: relation "gitlab_secondary.ci_job_artifacts" does not exist at character 323
STATEMENT: SELECT a.attname, format_type(a.atttypid, a.atttypmod),
pg_get_expr(d.adbin, d.adrelid), a.attnotnull, a.atttypid, a.atttypmod
Loading
Loading
Loading
Loading
@@ -101,7 +101,7 @@ end
in a prepended module, which is very likely the case in EE. We could see
error like this:
 
```
```plaintext
1.1) Failure/Error: expect_any_instance_of(ApplicationSetting).to receive_messages(messages)
Using `any_instance` to stub a method (elasticsearch_indexing) that has been defined on a prepended module (EE::ApplicationSetting) is not supported.
```
Loading
Loading
Loading
Loading
@@ -488,7 +488,7 @@ The linter will take the following into account:
 
The errors are grouped per file, and per message ID:
 
```
```plaintext
Errors in `locale/zh_HK/gitlab.po`:
PO-syntax errors
SimplePoParser::ParserErrorSyntax error in lines
Loading
Loading
Loading
Loading
@@ -63,7 +63,7 @@ class StuckImportJobsWorker
Marked stuck import jobs as failed. JIDs: xyz
```
 
```
```plaintext
+-----------+ +-----------------------------------+
|Export Job |--->| Calls ActiveRecord `as_json` and |
+-----------+ | `to_json` on all project models |
Loading
Loading
Loading
Loading
@@ -148,7 +148,7 @@ In this section we'll detail any known issues we've seen when trying to import a
 
If you're attempting to import a large project into a development environment, you may see Gitaly throw an error about too many calls or invocations, for example:
 
```
```plaintext
Error importing repository into qa-perf-testing/gitlabhq - GitalyClient#call called 31 times from single request. Potential n+1?
```
 
Loading
Loading
Loading
Loading
@@ -87,7 +87,7 @@ Ruby code. In case of the above snippet you'd run the following:
 
This will print out something along the lines of:
 
```
```plaintext
From: /path/to/your/gitlab/lib/gitlab/metrics/instrumentation.rb @ line 148:
Owner: #<Module:0x0055f0865c6d50>
Visibility: public
Loading
Loading
Loading
Loading
@@ -31,7 +31,7 @@ The following are required to install and test the app:
 
For example:
 
```
```plaintext
https://xxxx.serveo.net/-/jira_connect/app_descriptor.json
```
 
Loading
Loading
Loading
Loading
@@ -34,7 +34,7 @@ Gitaly.
When called from Gitaly in a `pre-receive` hook the changes are passed
and those are validated to determine if the push is allowed.
 
```
```plaintext
POST /internal/allowed
```
 
Loading
Loading
@@ -57,7 +57,7 @@ curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" --da
 
Example response:
 
```
```json
{
"status": true,
"gl_repository": "project-3",
Loading
Loading
@@ -103,7 +103,7 @@ Example request:
curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded token>" --data "key_id=11&project=gnuwget/wget2" http://localhost:3001/api/v4/internal/lfs_authenticate
```
 
```
```json
{
"username": "root",
"lfs_token": "eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJkYXRhIjp7ImFjdG9yIjoicm9vdCJ9LCJqdGkiOiIyYWJhZDcxZC0xNDFlLTQ2NGUtOTZlMi1mODllYWRiMGVmZTYiLCJpYXQiOjE1NzAxMTc2NzYsIm5iZiI6MTU3MDExNzY3MSwiZXhwIjoxNTcwMTE5NDc2fQ.g7atlBw1QMY7QEBVPE0LZ8ZlKtaRzaMRmNn41r2YITM",
Loading
Loading
@@ -126,7 +126,7 @@ lookup](../administration/operations/fast_ssh_key_lookup.md).
|:----------|:-------|:---------|:------------|
| `key` | string | yes | SSH key as passed by OpenSSH to GitLab-shell |
 
```
```plaintext
GET /internal/authorized_keys
```
 
Loading
Loading
@@ -138,7 +138,7 @@ curl --request GET --header "Gitlab-Shared-Secret: <Base64 encoded secret>""http
 
Example response:
 
```
```json
{
"id": 11,
"title": "admin@example.com",
Loading
Loading
@@ -161,7 +161,7 @@ discovers the user associated with an SSH key.
| `key_id` | integer | no | The id of the SSH key used as found in the authorized-keys file or through the `/authorized_keys` check |
| `username` | string | no | Username of the user being looked up, used by GitLab-shell when authenticating using a certificate |
 
```
```plaintext
GET /internal/discover
```
 
Loading
Loading
@@ -173,7 +173,7 @@ curl --request GET --header "Gitlab-Shared-Secret: <Base64 encoded secret>" "htt
 
Example response:
 
```
```json
{
"id": 7,
"name": "Dede Eichmann",
Loading
Loading
@@ -190,7 +190,7 @@ Example response:
This get's some generic information about the instance. This is used
by Geo nodes to get information about eachother
 
```
```plaintext
GET /internal/check
```
 
Loading
Loading
@@ -202,7 +202,7 @@ curl --request GET --header "Gitlab-Shared-Secret: <Base64 encoded secret>" "htt
 
Example response:
 
```
```json
{
"api_version": "v4",
"gitlab_version": "12.3.0-pre",
Loading
Loading
@@ -226,7 +226,7 @@ recovery codes based on their SSH key
| `key_id` | integer | no | The id of the SSH key used as found in the authorized-keys file or through the `/authorized_keys` check |
| `user_id` | integer | no | **Deprecated** User_id for which to generate new recovery codes |
 
```
```plaintext
GET /internal/two_factor_recovery_codes
```
 
Loading
Loading
@@ -238,7 +238,7 @@ curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --d
 
Example response:
 
```
```json
{
"success": true,
"recovery_codes": [
Loading
Loading
@@ -269,7 +269,7 @@ for a push that might be accepted.
|:----------|:-------|:---------|:------------|
| `gl_repository` | string | yes | repository identifier for the repository receiving the push |
 
```
```plaintext
POST /internal/pre_receive
```
 
Loading
Loading
@@ -281,7 +281,7 @@ curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --d
 
Example response:
 
```
```json
{
"reference_counter_increased": true
}
Loading
Loading
@@ -301,7 +301,7 @@ the user.
| `push_options` | string array | no | array of push options |
| `changes` | string | no | refs to be updated in the push in the format `oldrev newrev refname\n`. |
 
```
```plaintext
POST /internal/post_receive
```
 
Loading
Loading
@@ -313,7 +313,7 @@ curl --request POST --header "Gitlab-Shared-Secret: <Base64 encoded secret>" --d
 
Example response:
 
```
```json
{
"messages": [
{
Loading
Loading
Loading
Loading
@@ -27,7 +27,7 @@ On the other hand, if an icon is crucial to understand the context we should do
 
In forms we should use the `for` attribute in the label statement:
 
```
```html
<div>
<label for="name">Fill in your name:</label>
<input type="text" id="name" name="name">
Loading
Loading
Loading
Loading
@@ -4,7 +4,7 @@
 
To clear production compiled assets created with `yarn webpack-prod` you can run:
 
```
```shell
yarn clean
```
 
Loading
Loading
Loading
Loading
@@ -7,13 +7,13 @@ support subgroups, GitLab project and group routes use the wildcard
character to match project and group routes. For example, we might have
a path such as:
 
```
```plaintext
/gitlab-com/customer-success/north-america/west/customerA
```
 
However, paths can be ambiguous. Consider the following example:
 
```
```plaintext
/gitlab-com/edit
```
 
Loading
Loading
@@ -29,7 +29,7 @@ number of [reserved names](../user/reserved_names.md).
 
We have a number of global routes. For example:
 
```
```plaintext
/-/health
/-/metrics
```
Loading
Loading
@@ -40,7 +40,7 @@ Every group route must be under the `/-/` scope.
 
Examples:
 
```
```plaintext
gitlab-org/-/edit
gitlab-org/-/activity
gitlab-org/-/security/dashboard
Loading
Loading
@@ -56,7 +56,7 @@ client or other software requires something different.
 
Examples:
 
```
```plaintext
gitlab-org/gitlab/-/activity
gitlab-org/gitlab/-/jobs/123
gitlab-org/gitlab/-/settings/repository
Loading
Loading
Loading
Loading
@@ -71,19 +71,21 @@ Make the difference between options and arguments clear to the argument parsers
 
To understand what `--` does, consider the problem below.
 
```
```shell
# Example
$ echo hello > -l
$ cat -l
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 `--`.
 
```
```shell
# Example (continued)
$ cat -- -l
hello
```
 
Loading
Loading
@@ -203,7 +205,7 @@ validates :import_url, format: { with: URI.regexp(%w(ssh git http https)) }
 
Suppose the user submits the following as their import URL:
 
```
```plaintext
file://git:/tmp/lol
```
 
Loading
Loading
Loading
Loading
@@ -329,7 +329,7 @@ use of extensions and concurrent index removal, you need at least PostgreSQL 9.2
 
1. Check if the `pg_trgm` extension is enabled:
 
```shell
```sql
SELECT true AS enabled
FROM pg_available_extensions
WHERE name = 'pg_trgm'
Loading
Loading
@@ -338,7 +338,7 @@ use of extensions and concurrent index removal, you need at least PostgreSQL 9.2
 
If the extension is enabled this will produce the following output:
 
```
```plaintext
enabled
---------
t
Loading
Loading
Loading
Loading
@@ -15,7 +15,7 @@ GitLab.com will generate an application ID and secret key for you to use.
- Name: This can be anything. Consider something like `<Organization>'s GitLab` or `<Your Name>'s GitLab` or something else descriptive.
- Redirect URI:
 
```
```plaintext
http://your-gitlab.example.com/import/gitlab/callback
http://your-gitlab.example.com/users/auth/gitlab/callback
```
Loading
Loading
@@ -63,7 +63,7 @@ GitLab.com will generate an application ID and secret key for you to use.
 
For installations from source:
 
```
```yaml
- { name: 'gitlab', app_id: 'YOUR_APP_ID',
app_secret: 'YOUR_APP_SECRET',
args: { scope: 'api' } }
Loading
Loading
Loading
Loading
@@ -28,7 +28,7 @@ In Google's side:
- **Authorized redirect URIs** - Enter your domain name followed by the
callback URIs one at a time:
 
```
```plaintext
https://gitlab.example.com/users/auth/google_oauth2/callback
https://gitlab.example.com/-/google_api/auth/callback
```
Loading
Loading
Loading
Loading
@@ -160,7 +160,7 @@ in the `gitlab.rb` config file, followed by the [`gitlab-ctl reconfigure` comman
If you don't find the errors above, but do find *duplicate* entries like below (in `/var/log/gitlab/gitlab-rail`), this
could also indicate that [webhook requests are timing out](../user/project/integrations/webhooks.md#receiving-duplicate-or-multiple-webhook-requests-triggered-by-one-event):
 
```
```plaintext
2019-10-25_04:22:41.25630 2019-10-25T04:22:41.256Z 1584 TID-ovowh4tek WebHookWorker JID-941fb7f40b69dff3d833c99b INFO: start
2019-10-25_04:22:41.25630 2019-10-25T04:22:41.256Z 1584 TID-ovowh4tek WebHookWorker JID-941fb7f40b69dff3d833c99b INFO: start
```
Loading
Loading
@@ -33,7 +33,7 @@ system's Kerberos settings.
The keytab is a sensitive file and must be readable by the GitLab user. Set
ownership and protect the file appropriately:
 
```
```shell
sudo chown git /etc/http.keytab
sudo chmod 0600 /etc/http.keytab
```
Loading
Loading
@@ -243,7 +243,7 @@ With Kerberos SPNEGO authentication, the browser is expected to send a list of
mechanisms it supports to GitLab. If it doesn't support any of the mechanisms
GitLab supports, authentication will fail with a message like this in the log:
 
```
```plaintext
OmniauthKerberosSpnegoController: failed to process Negotiate/Kerberos authentication: gss_accept_sec_context did not return GSS_S_COMPLETE: An unsupported mechanism was requested Unknown error
```
 
Loading
Loading
@@ -282,7 +282,7 @@ fatal: Authentication failed for '<KRB5 path>'
If you are using Git v2.11 or newer and see the above error when cloning, you can
set the `http.emptyAuth` Git option to `true` to fix this:
 
```
```shell
git config --global http.emptyAuth true
```
 
Loading
Loading
Loading
Loading
@@ -26,7 +26,7 @@ This strategy is designed to allow configuration of the simple OmniAuth SSO proc
 
The redirect URI you provide when registering the application should be:
 
```
```plaintext
http://your-gitlab.host.com/users/auth/oauth2_generic/callback
```
 
Loading
Loading
Loading
Loading
@@ -23,7 +23,7 @@ user logins via passwords, the `X-GitLab-Show-Login-Captcha` HTTP header must
be set. For example, in NGINX, this can be done via the `proxy_set_header`
configuration variable:
 
```
```nginx
proxy_set_header X-GitLab-Show-Login-Captcha 1;
```
 
Loading
Loading
Loading
Loading
@@ -60,7 +60,7 @@ To get the credentials (a pair of Client ID and Client Secret), you must [create
 
For installation from source:
 
```
```yaml
- { name: 'salesforce',
app_id: 'SALESFORCE_CLIENT_ID',
app_secret: 'SALESFORCE_CLIENT_SECRET'
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment