From 47e35934185ed4292b1b7ef365a3156cc3e0293f Mon Sep 17 00:00:00 2001 From: GitLab Bot Date: Sat, 18 Jan 2020 03:08:23 +0000 Subject: Add latest changes from gitlab-org/gitlab@master --- .../operations/cleaning_up_redis_sessions.md | 6 +++--- doc/administration/operations/fast_ssh_key_lookup.md | 20 ++++++++++---------- 2 files changed, 13 insertions(+), 13 deletions(-) (limited to 'doc/administration/operations') diff --git a/doc/administration/operations/cleaning_up_redis_sessions.md b/doc/administration/operations/cleaning_up_redis_sessions.md index fd469ae23e3..38fac8a0eca 100644 --- a/doc/administration/operations/cleaning_up_redis_sessions.md +++ b/doc/administration/operations/cleaning_up_redis_sessions.md @@ -22,7 +22,7 @@ settings outlined in First we define a shell function with the proper Redis connection details. -``` +```shell rcli() { # This example works for Omnibus installations of GitLab 7.3 or newer. For an # installation from source you will have to change the socket path and the @@ -37,7 +37,7 @@ rcli ping Now we do a search to see if there are any session keys in the old format for us to clean up. -``` +```shell # returns the number of old-format session keys in Redis rcli keys '*' | grep '^[a-f0-9]\{32\}$' | wc -l ``` @@ -45,7 +45,7 @@ rcli keys '*' | grep '^[a-f0-9]\{32\}$' | wc -l If the number is larger than zero, you can proceed to expire the keys from Redis. If the number is zero there is nothing to clean up. -``` +```shell # Tell Redis to expire each matched key after 600 seconds. rcli keys '*' | grep '^[a-f0-9]\{32\}$' | awk '{ print "expire", $0, 600 }' | rcli # This will print '(integer) 1' for each key that gets expired. diff --git a/doc/administration/operations/fast_ssh_key_lookup.md b/doc/administration/operations/fast_ssh_key_lookup.md index 9a38e8ddd23..96571b0a5d9 100644 --- a/doc/administration/operations/fast_ssh_key_lookup.md +++ b/doc/administration/operations/fast_ssh_key_lookup.md @@ -53,7 +53,7 @@ Add the following to your `sshd_config` file. This is usually located at `/etc/ssh/sshd_config`, but it will be `/assets/sshd_config` if you're using Omnibus Docker: -``` +```plaintext AuthorizedKeysCommand /opt/gitlab/embedded/service/gitlab-shell/bin/gitlab-shell-authorized-keys-check git %u %k AuthorizedKeysCommandUser git ``` @@ -117,7 +117,7 @@ the database. The following instructions can be used to build OpenSSH 7.5: 1. First, download the package and install the required packages: - ``` + ```shell sudo su - cd /tmp curl --remote-name https://mirrors.evowise.com/pub/OpenBSD/OpenSSH/portable/openssh-7.5p1.tar.gz @@ -127,7 +127,7 @@ the database. The following instructions can be used to build OpenSSH 7.5: 1. Prepare the build by copying files to the right place: - ``` + ```shell mkdir -p /root/rpmbuild/{SOURCES,SPECS} cp ./openssh-7.5p1/contrib/redhat/openssh.spec /root/rpmbuild/SPECS/ cp openssh-7.5p1.tar.gz /root/rpmbuild/SOURCES/ @@ -136,7 +136,7 @@ the database. The following instructions can be used to build OpenSSH 7.5: 1. Next, set the spec settings properly: - ``` + ```shell sed -i -e "s/%define no_gnome_askpass 0/%define no_gnome_askpass 1/g" openssh.spec sed -i -e "s/%define no_x11_askpass 0/%define no_x11_askpass 1/g" openssh.spec sed -i -e "s/BuildPreReq/BuildRequires/g" openssh.spec @@ -144,19 +144,19 @@ the database. The following instructions can be used to build OpenSSH 7.5: 1. Build the RPMs: - ``` + ```shell rpmbuild -bb openssh.spec ``` 1. Ensure the RPMs were built: - ``` + ```shell ls -al /root/rpmbuild/RPMS/x86_64/ ``` You should see something as the following: - ``` + ```plaintext total 1324 drwxr-xr-x. 2 root root 4096 Jun 20 19:37 . drwxr-xr-x. 3 root root 19 Jun 20 19:37 .. @@ -170,7 +170,7 @@ the database. The following instructions can be used to build OpenSSH 7.5: with its own version, which may prevent users from logging in, so be sure that the file is backed up and restored after installation: - ``` + ```shell timestamp=$(date +%s) cp /etc/pam.d/sshd pam-ssh-conf-$timestamp rpm -Uvh /root/rpmbuild/RPMS/x86_64/*.rpm @@ -179,7 +179,7 @@ the database. The following instructions can be used to build OpenSSH 7.5: 1. Verify the installed version. In another window, attempt to login to the server: - ``` + ```shell ssh -v ``` @@ -191,7 +191,7 @@ the database. The following instructions can be used to build OpenSSH 7.5: sure everything is working! If you need to downgrade, simple install the older package: - ``` + ```shell # Only run this if you run into a problem logging in yum downgrade openssh-server openssh openssh-clients ``` -- cgit v1.2.1