Update two_factor_authentication.md

I wanted to practice GFM markdown, so I picked this page more or
less at random. I flattened out the text a little. It's not as
interesting, but will be easier to translate. Use it if it looks
like an improvement. If not, at least I got some practice out of the deal!

Signed-off-by: Rémy Coutable <remy@rymai.me>
This commit is contained in:
William Abernathy 2016-12-10 01:38:41 +00:00 committed by Rémy Coutable
parent 329acc683a
commit 0d5dc1c575
No known key found for this signature in database
GPG key ID: 46DF07E5CD9E96AB

View file

@ -140,70 +140,68 @@ into the password field.
## Recovery options ## Recovery options
If you lose your code generation device (such as your mobile phone) and you need To disable two-factor authentication on your account (for example, if you
to disable two-factor authentication on your account, you have several options. have lost your code generation device) you can:
* [Use a saved recovery code](#use-a-saved-recovery-code)
* [Generate new recovery codes using SSH](#generate-new-recovery-codes-using-SSH)
* [Ask a GitLab administrator to disable two-factor authentication on your account](#ask-a-gitlab-administrator-to-disable-two-factor-authentication-on-your-account)
### Use a saved recovery code ### Use a saved recovery code
When you enabled two-factor authentication for your account, a series of Enabling two-factor authentication for your account generated several recovery
recovery codes were generated. If you saved those codes somewhere safe, you codes. If you saved these codes, you can use one of them to sign in.
may use one to sign in.
First, enter your username/email and password on the GitLab sign in page. When To use a recovery code, enter your username/email and password on the GitLab
prompted for a two-factor code, enter one of the recovery codes you saved sign-in page. When prompted for a two-factor code, enter the recovery code.
previously.
> **Note:** Once a particular recovery code has been used, it cannot be used again. > **Note:** Once you use a recovery code, you cannot re-use it. You can still
You may still use the other saved recovery codes at a later time. use the other recovery codes you saved.
### Generate new recovery codes using SSH ### Generate new recovery codes using SSH
It's not uncommon for users to forget to save the recovery codes when enabling Users often forget to save their recovery codes when enabling two-factor
two-factor authentication. If you have an SSH key added to your GitLab account, authentication. If an SSH key is added to your GitLab account, you can generate
you can generate a new set of recovery codes using SSH. a new set of recovery codes with SSH.
Run `ssh git@gitlab.example.com 2fa_recovery_codes`. You will be prompted to 1. Run `ssh git@gitlab.example.com 2fa_recovery_codes`.
confirm that you wish to generate new codes. If you choose to continue, any 2. You are prompted to confirm that you want to generate new codes. Continuing this process invalidates previously saved codes.
previously saved codes will be invalidated. ```
bash
$ ssh git@gitlab.example.com 2fa_recovery_codes
Are you sure you want to generate new two-factor recovery codes?
Any existing recovery codes you saved will be invalidated. (yes/no)
```bash yes
$ ssh git@gitlab.example.com 2fa_recovery_codes
Are you sure you want to generate new two-factor recovery codes?
Any existing recovery codes you saved will be invalidated. (yes/no)
yes
Your two-factor authentication recovery codes are: Your two-factor authentication recovery codes are:
119135e5a3ebce8e 119135e5a3ebce8e
11f6v2a498810dcd 11f6v2a498810dcd
3924c7ab2089c902 3924c7ab2089c902
e79a3398bfe4f224 e79a3398bfe4f224
34bd7b74adbc8861 34bd7b74adbc8861
f061691d5107df1a f061691d5107df1a
169bf32a18e63e7f 169bf32a18e63e7f
b510e7422e81c947 b510e7422e81c947
20dbed24c5e74663 20dbed24c5e74663
df9d3b9403b9c9f0 df9d3b9403b9c9f0
During sign in, use one of the codes above when prompted for During sign in, use one of the codes above when prompted for your
your two-factor code. Then, visit your Profile Settings and add two-factor code. Then, visit your Profile Settings and add a new device
a new device so you do not lose access to your account again. so you do not lose access to your account again.
``` ```
3. Go to the GitLab sign-in page and enter your username/email and password. When prompted for a two-factor code, enter one of the recovery codes obtained
from the command-line output.
Next, go to the GitLab sign in page and enter your username/email and password. > **Note:** After signing in, visit your **Profile Settings -> Account** immediately to set up two-factor authentication with a new
When prompted for a two-factor code, enter one of the recovery codes obtained device.
from the command line output.
> **Note:** After signing in, you should immediately visit your **Profile Settings ### Ask a GitLab administrator to disable two-factor authentication on your account
-> Account** to set up two-factor authentication with a new device.
### Ask a GitLab administrator to disable two-factor on your account If you cannot use a saved recovery code or generate new recovery codes, ask a
GitLab global administrator to disable two-factor authentication for your
If the above two methods are not possible, you may ask a GitLab global account. This will temporarily leave your account in a less secure state.
administrator to disable two-factor authentication for your account. Please Sign in and re-enable two-factor authentication as soon as possible.
be aware that this will temporarily leave your account in a less secure state.
You should sign in and re-enable two-factor authentication as soon as possible
after the administrator disables it.
## Note to GitLab administrators ## Note to GitLab administrators