| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 1 | # Gerrit ReAuth |
| 2 | |
| Jiewei Qian | 68acdc8 | 2025-09-30 08:16:56 | [diff] [blame] | 3 | *** note |
| 4 | **Googlers:** |
| 5 | |
| 6 | If you use your @google.com account, or a @chromium.org account linked to your |
| 7 | @google.com account: You already ReAuth during your daily `gcert`, no further |
| 8 | action is required. Feel free to stop reading now. |
| 9 | |
| Jiewei Qian | 268dc13 | 2025-10-15 04:34:17 | [diff] [blame] | 10 | If you use a @chromium.org account that isn't linked to your google.com account, |
| 11 | with a Google-issued security key, on devices managed by Google (e.g. gLinux), |
| 12 | simply run `git credential-luci reauth`, follow the prompts to complete ReAuth. |
| 13 | You need to ReAuth every 20 hours (just like `gcert`). |
| 14 | |
| Jiewei Qian | 91bc65f | 2025-10-21 03:51:13 | [diff] [blame] | 15 | If you use a terminal persistence tool, such as screen, tmux, or shpool, refer |
| 16 | to [the internal guide](go/gerrit-reauth#bookmark=id.gohr0ejjvi49) for |
| 17 | additional instructions. |
| 18 | |
| Jiewei Qian | 68acdc8 | 2025-09-30 08:16:56 | [diff] [blame] | 19 | Otherwise, follow this guide to ReAuth locally or remotely. |
| 20 | |
| 21 | If you aren't sure if your account is linked, follow |
| 22 | [the steps here](http://go/chromium-account-support#how-can-i-check-if-my-gerrit-accounts-are-linked). |
| 23 | |
| Jiewei Qian | 268dc13 | 2025-10-15 04:34:17 | [diff] [blame] | 24 | For more information, see this internal doc: |
| 25 | [go/gerrit-reauth](http://go/gerrit-reauth). |
| Jiewei Qian | 2d2ca0f | 2025-08-29 05:00:34 | [diff] [blame] | 26 | *** |
| 27 | |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 28 | [TOC] |
| 29 | |
| 30 | ## Background |
| 31 | |
| 32 | To further protect the integrity of Chromium’s codebase and other related |
| 33 | projects, including Git repositories, a significant security enhancement is |
| 34 | being implemented. This enhancement requires all **committers** who write or |
| 35 | review code to utilize a security key for two-factor authentication on their |
| 36 | associated Google account. |
| 37 | |
| 38 | This new approach, referred to as ReAuth, mandates a security key tap once every |
| 39 | 20 hours to obtain a fresh set of credentials for interactions with Git and |
| 40 | Gerrit. Specifically, actions requiring committer powers, such as reviewing |
| 41 | Change Lists (CLs) for submission and uploading CLs (which counts as the |
| 42 | uploader self-reviewing the CL), will necessitate ReAuth. |
| 43 | |
| 44 | The primary goal of this policy is to establish a robust layer of protection |
| 45 | against unauthorized access, significantly diminishing the risk of compromised |
| 46 | accounts, supply chain attacks, and malicious activities stemming from stolen |
| 47 | committer credentials. |
| 48 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 49 | ## Overview |
| 50 | |
| 51 | You are required to ReAuth when using git-cl to upload your change. You |
| 52 | ReAuth to git-cl by running `git credential-luci reauth`. |
| 53 | |
| 54 | Gerrit Web UI may show [ReAuth popups](#reauth-in-gerrit-web-ui) when you |
| 55 | perform actions like voting Code-Review or editing change descriptions. |
| 56 | In this case, please follow the popup's instructions. |
| 57 | |
| 58 | *** promo |
| 59 | ReAuth is valid for 20 hours, so we recommend ReAuth once when you start your |
| 60 | day with `git credential-luci reauth`. |
| 61 | *** |
| 62 | |
| 63 | *** note |
| 64 | If you work remotely over SSH or remote desktop, please follow steps in |
| 65 | [ReAuth in git-cl remotely](#ReAuth-in-git_cl-remotely) to setup your |
| 66 | environment. |
| 67 | |
| Jiewei Qian | a6bdd63 | 2025-10-07 04:32:17 | [diff] [blame] | 68 | If you use Linux: |
| 69 | |
| 70 | 1. You need to install a GUI-based `pinentry` program to enter security key |
| 71 | PINs. Certain security keys models mandate PIN entry at all times. |
| 72 | |
| 73 | 1. You might also need to [configure your system](#linux-security-keys-access) |
| 74 | to make security keys usable. |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 75 | *** |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 76 | |
| 77 | ## Prerequisites |
| 78 | |
| 79 | ### Physical Security Key |
| 80 | |
| 81 | You must have a physical |
| 82 | [FIDO security key](https://www.google.com/search?q=FIDO+security+key) |
| 83 | registered with your Google account. |
| 84 | |
| 85 | To register a key or check your existing keys, go to |
| 86 | [https://myaccount.google.com/signinoptions/passkeys](https://myaccount.google.com/signinoptions/passkeys) |
| 87 | |
| 88 |  |
| 89 | |
| 90 | The line "This key can only be used with a password" indicates a **U2F** |
| 91 | security key. If the line is missing, the key is a **FIDO2** security key. |
| 92 | Please include this info when reporting issues. |
| 93 | |
| Jiewei Qian | 13e6e40d | 2025-10-14 04:09:14 | [diff] [blame] | 94 | *** promo |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 95 | **Important Note**: Passkeys won't be supported by ReAuth. A physical security |
| 96 | key is required. |
| Jiewei Qian | 13e6e40d | 2025-10-14 04:09:14 | [diff] [blame] | 97 | *** |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 98 | |
| Jiewei Qian | 13e6e40d | 2025-10-14 04:09:14 | [diff] [blame] | 99 | **If you use Firefox**: You need to **allow** the website to request "extended |
| 100 | information about your security key" when registering your security key (refer |
| 101 | to the screenshot below). |
| 102 | Otherwise the key won't be able to ReAuth (you'll see BAD_REQUEST error in the |
| 103 | log). If you've already registered the key, remove it from the security key |
| 104 | list, then add it again. |
| Jiewei Qian | d1e33d3f | 2025-10-07 00:48:37 | [diff] [blame] | 105 | |
| Jiewei Qian | 13e6e40d | 2025-10-14 04:09:14 | [diff] [blame] | 106 |  |
| 107 | |
| 108 | **If you’re using a Google Workspace account**, make sure |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 109 | "[2-Step Verification](https://myaccount.google.com/signinoptions/twosv)" is |
| 110 | turned on. |
| 111 | |
| 112 |  |
| 113 | |
| Jiewei Qian | 13e6e40d | 2025-10-14 04:09:14 | [diff] [blame] | 114 | *** note |
| Jiewei Qian | 236299ef | 2025-10-08 04:09:05 | [diff] [blame] | 115 | **Known Issue:** If you sign in to your Google account via an external identity provider |
| 116 | such as **Active Directory, Entra ID, or Okta**, you may see `NO_AVAILABLE_CHALLENGES` error |
| 117 | when you ReAuth immediately after registering your security key. |
| 118 | |
| 119 | You may need to **wait for a few hours** before your first ReAuth can proceed. We're still |
| 120 | investigating the cause. |
| Jiewei Qian | 13e6e40d | 2025-10-14 04:09:14 | [diff] [blame] | 121 | *** |
| Jiewei Qian | 236299ef | 2025-10-08 04:09:05 | [diff] [blame] | 122 | |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 123 | ### Accurate Timezone / Time |
| 124 | |
| 125 | Make sure your device's timezone and time are set correctly. |
| 126 | |
| 127 | If you’re behind a corporate network or network proxy, your system’s auto |
| 128 | configured timezone might be incorrect. If this is the case, go to your system’s |
| 129 | settings and set timezone and/or time manually. |
| 130 | |
| Allen Li | 7da6849d | 2025-09-09 00:35:23 | [diff] [blame] | 131 | ### Latest Git |
| 132 | |
| 133 | Ensure you have the latest version of Git (or at least later than 2.46.0). Use |
| 134 | the package manager for your system or download from the [Git |
| 135 | website](https://git-scm.com/downloads). (Note: if you are on Ubuntu LTS you may |
| 136 | need to follow the instructions on the Git website to install from PPA) |
| 137 | |
| Jiewei Qian | a6888974 | 2025-09-04 01:11:58 | [diff] [blame] | 138 | ### Latest depot_tools |
| 139 | |
| 140 | Ensure you |
| 141 | [have depot_tools](https://commondatastorage.googleapis.com/chrome-infra-docs/flat/depot_tools/docs/html/depot_tools_tutorial.html#_setting_up) |
| 142 | installed and configured on PATH. |
| 143 | |
| 144 | Then run: |
| 145 | |
| 146 | ``` |
| 147 | update_depot_tools |
| 148 | ``` |
| 149 | |
| 150 | ### Git config for Gerrit |
| 151 | |
| 152 | Make sure your Git is configured for Gerrit. You only need to do this once. |
| 153 | |
| 154 | ``` |
| 155 | git cl creds-check --global |
| 156 | ``` |
| 157 | |
| 158 | Please follow the prompts from the tool and resolve any issues. |
| 159 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 160 | ### Log into Gerrit |
| 161 | |
| 162 | Check if you're already logged in (this is likely if you have already logged |
| 163 | in with depot_tools): |
| 164 | |
| 165 | ``` |
| 166 | git credential-luci info |
| 167 | ``` |
| 168 | |
| 169 | This should print a line containing `email=<your email>`. If not, you'll need to |
| 170 | login first: |
| 171 | |
| 172 | ``` |
| 173 | git credential-luci login |
| 174 | ``` |
| 175 | |
| Jiewei Qian | 4c42c99ad | 2025-09-30 07:58:03 | [diff] [blame] | 176 | ### Linux: security keys access |
| 177 | |
| 178 | Check depot_tools can access your security keys by running: |
| 179 | |
| 180 | ``` |
| 181 | luci-auth-fido2-plugin --list-devices |
| 182 | ``` |
| 183 | |
| 184 | If the above command lists your security keys, you’re good to go. |
| 185 | |
| 186 | If not, you need to configure your Linux system to grant access to security |
| 187 | keys. |
| 188 | |
| 189 | The configuration steps vary by Linux distributions. We recommend following |
| 190 | [Yubico’s guide](https://support.yubico.com/hc/en-us/articles/360013708900-Troubleshooting-using-your-YubiKey-with-Linux) |
| 191 | , which we confirmed to be working on Ubuntu 24.04 LTS Desktop. |
| 192 | |
| Jiewei Qian | a6bdd63 | 2025-10-07 04:32:17 | [diff] [blame] | 193 | ### Linux: security key PIN entry program |
| 194 | |
| 195 | ReAuth doesn't require security key PINs. But PINs entry might be enforced by |
| 196 | the security key manufacturer, or if you have configured your key to do so. |
| 197 | |
| 198 | On Linux, you need the `pinentry` program to input PINs. If you don't have this |
| 199 | program, your security key will refuse to complete the ReAuth challenge. You |
| 200 | typically see `BAD_REQUEST` or `PinRequiredError` in the logs depending on the |
| 201 | security key. |
| 202 | |
| 203 | For the best experience, we recommend using a **GUI based pinentry** program. |
| 204 | |
| 205 | Terminal based pinentry only works with local ReAuth. If you don't need to |
| 206 | ReAuth over SSH, feel free to use one. |
| 207 | |
| 208 | To install a GUI-based pinentry program: |
| 209 | |
| 210 | * Ubuntu, Debian: `sudo apt install pinentry-gnome3` |
| 211 | * Fedora: `sudo dnf install pinentry-qt` |
| 212 | |
| 213 | After installing the package, your system should default to the newly installed |
| 214 | GUI-based pinentry program. |
| 215 | |
| 216 | You can check the current pinentry program by running: |
| 217 | |
| 218 | ``` |
| 219 | readlink -f $( which pinentry ) |
| 220 | ``` |
| 221 | |
| 222 | The output path's suffix should be a GUI based name, such as "-gnome" or "-qt". |
| 223 | |
| 224 | If the above path ends with terminal based name, such as "tty" or "curses", set |
| 225 | `LUCI_AUTH_PINENTRY=pinentry-gnome3` environment variable to override. |
| 226 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 227 | ## ReAuth in Gerrit Web UI |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 228 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 229 | When performing actions such as voting Code-Review or editing commit |
| 230 | descriptions on Gerrit Web UI, you may see popups like: |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 231 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 232 |  |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 233 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 234 | Click "Continue". You'll be asked to touch your security key to perform ReAuth, |
| 235 | after which everything will proceed as normal. |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 236 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 237 | ## ReAuth in git-cl locally |
| 238 | |
| 239 | This is for performing ReAuth locally, on a machine with your security key |
| 240 | inserted. |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 241 | |
| Jiewei Qian | a6888974 | 2025-09-04 01:11:58 | [diff] [blame] | 242 | First, make sure you have the [latest depot_tools](#latest-depot_tools) and |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 243 | have [set up Git to access Gerrit](#git-config-for-gerrit), and is |
| 244 | [logged into Gerrit](#log-into-gerrit). If you're using Linux, make sure |
| Jiewei Qian | 4c42c99ad | 2025-09-30 07:58:03 | [diff] [blame] | 245 | [depot_tools can access your security keys](#linux_security-keys-access). |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 246 | |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 247 | To perform ReAuth, run the following command inside your terminal: |
| 248 | |
| 249 | ``` |
| 250 | git credential-luci reauth |
| 251 | ``` |
| 252 | |
| 253 | You will be prompted to touch your security key. If you see “ReAuth succeed.”, |
| 254 | then it works\! |
| 255 | |
| 256 | If it doesn't work, please refer to [Troubleshooting](#troubleshooting) to turn |
| 257 | on debug logs, then retry the command. |
| 258 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 259 | ## ReAuth in git-cl remotely |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 260 | |
| 261 | This is for completing ReAuth when: |
| 262 | |
| 263 | - You plug-in a security key to a local client machine machine |
| 264 | - You SSH or remote desktop into a remote development machine (where the |
| 265 | chromium/src checkout lives) |
| 266 | |
| Jiewei Qian | a6888974 | 2025-09-04 01:11:58 | [diff] [blame] | 267 | First, make sure you have the [latest depot_tools](#latest-depot_tools) |
| 268 | installed on **both local and remote** machines. |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 269 | |
| Jiewei Qian | 4c42c99ad | 2025-09-30 07:58:03 | [diff] [blame] | 270 | If you're using a Linux local machine (i.e. the machine you inserts security |
| 271 | keys into), make sure |
| 272 | [depot_tools can access your security keys](#linux_security-keys-access). |
| 273 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 274 | Then, on the remote machine, make sure you have |
| 275 | [set up Git to access](#git-config-for-gerrit) and have |
| 276 | [logged into Gerrit](#log-into-gerrit). |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 277 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 278 | Then, refer to sections below for your SSH or remote desktop workflow. |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 279 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 280 | ### I’m using a Linux / Mac client, I want to SSH into Linux |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 281 | |
| Jiewei Qian | 4c42c99ad | 2025-09-30 07:58:03 | [diff] [blame] | 282 | If you’re using a Linux client, please check and make sure |
| 283 | [depot_tools can access your security keys](#linux_security-keys-access). |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 284 | |
| Jiewei Qian | 88cb1b6 | 2025-09-30 08:02:49 | [diff] [blame] | 285 | Then, use `luci-auth-ssh-helper` to SSH into the remote machine. You can |
| 286 | specify SSH options (such as port forwarding) after a double dash. |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 287 | |
| 288 | ``` |
| 289 | luci-auth-ssh-helper [-- ssh_options...] [user@]host |
| 290 | ``` |
| 291 | |
| 292 | In this SSH session, run the following command to ReAuth: |
| 293 | |
| 294 | ``` |
| 295 | git credential-luci reauth |
| 296 | ``` |
| 297 | |
| 298 | You should be prompted to touch your security key. If you see "ReAuth succeed", |
| 299 | then it works\! |
| 300 | |
| 301 | For the first security key touch, there might be a delay before your security |
| 302 | key starts blinking. This is caused by `luci-auth-fido2-plugin` bootstrapping. |
| 303 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 304 | ### I’m using a Linux / Mac client, I want to remote desktop into Windows |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 305 | |
| 306 | If you’re using a Linux client, ensure you’ve completed |
| 307 | ["Linux Client Prerequisites"](#linux-client-prerequisites) and made your |
| 308 | security keys available to applications. |
| 309 | |
| 310 | You need a remote desktop client that supports WebAuthn forwarding. |
| 311 | |
| 312 | For example, |
| 313 | [Thincast Remote Desktop Client](https://thincast.com/en/products/client) |
| 314 | (available free of charge for non-commercial use): |
| 315 | |
| 316 | - On Linux, install the **flatpak version** |
| 317 | ([instructions](https://thincast.com/en/documentation/tcc/latest/index#install-linux)). |
| 318 | Snapcraft version doesn’t work with security keys (as of 2025 August) |
| 319 | - On MacOS, download and install the universal dmg package |
| 320 | ([instructions](https://thincast.com/en/documentation/tcc/latest/index#install-linux)) |
| 321 | |
| 322 | Then, launch the Thincast remote desktop client, enable the "WebAuthn" option in |
| 323 | "Local Resource \> Local devices and resource \> More…" (refer to screenshots |
| 324 | below). |
| 325 | |
| 326 | Click "OK" to save your settings, then go back to the "General" tab, input the |
| 327 | remote desktop server with your development machine’s hostname (or IP address) |
| 328 | and user name, then click "Connect". |
| 329 | |
| 330 |  |
| 331 | |
| 332 |  |
| 333 | |
| 334 | In the remote desktop session, open a command prompt (CMD), then run the |
| 335 | following command to ReAuth: |
| 336 | |
| 337 | ``` |
| 338 | git credential-luci reauth |
| 339 | ``` |
| 340 | |
| 341 | Wait for your security key to blink, then touch it to complete ReAuth. You |
| 342 | should see "ReAuth succeed" in the command prompt. |
| 343 | |
| 344 | For the first security key touch, there might be a delay before your security |
| 345 | key starts blinking. This is caused by `luci-auth-fido2-plugin` bootstrapping. |
| 346 | |
| Jiewei Qian | 33461d9 | 2025-10-24 04:44:47 | [diff] [blame] | 347 | ### I’m using a Windows client, I want to SSH into Linux |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 348 | |
| 349 | First, start `luci-auth-ssh-helper` in daemon mode on a TCP port (we use 10899 |
| 350 | in the example). The helper will listen for incoming ReAuth challenges. |
| 351 | |
| 352 | ``` |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 353 | luci-auth-ssh-helper -mode=daemon -port=10899 |
| 354 | ``` |
| 355 | |
| 356 | Then, use your SSH client and port-forward a port (here we use the same port |
| 357 | number for convenience) on your remote Linux machine to the helper’s port on the |
| 358 | local machine. |
| 359 | |
| 360 | Note, you might need to update your SSH server config to allow port-forwarding |
| 361 | (if not enabled by default). |
| 362 | |
| 363 | If you’re using the an OpenSSH client (e.g. built-in to Windows, or included in |
| 364 | Git-on-Windows): |
| 365 | |
| 366 | ``` |
| 367 | ssh -R 10899:localhost:10899 [user@]remote_host |
| 368 | ``` |
| 369 | |
| 370 | If you’re using PuTTY, set up port-forwarding on the "Connection \> SSH \> |
| 371 | Tunnels" page in the connection dialog (see screenshot). Remember to "Save" your |
| 372 | configuration in the "Session" page if you want to persist the configuration. |
| 373 | |
| 374 |  |
| 375 | |
| 376 | Inside your SSH session, set `SSH_AUTH_SOCK` to the forwarding port, then run |
| 377 | the ReAuth command. |
| 378 | |
| 379 | ``` |
| 380 | export SSH_AUTH_SOCK=localhost:10899 |
| 381 | git credential-luci reauth |
| 382 | ``` |
| 383 | |
| 384 | Windows will prompt you to touch the security key. Touch the security to |
| 385 | complete ReAuth. If you see "ReAuth succeed", then it works. |
| 386 | |
| 387 | For the first security key touch, there might be a delay before your security |
| 388 | key starts blinking. This is caused by `luci-auth-ssh-plugin` and |
| 389 | `luci-auth-fido2-plugin` bootstrapping. |
| 390 | |
| 391 | You need to make sure `luci-auth-ssh-helper` is running on your local machine |
| 392 | when you want to perform ReAuth challenges over a SSH session. For convenience, |
| 393 | you can register it to start as a service on login. |
| 394 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 395 | ### I’m using a Windows client, I want to remote desktop into Windows |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 396 | |
| 397 | Use the built-in Windows Remote Desktop Connection application (also known as |
| 398 | `mstsc`), make sure "WebAuthn (Windows Hello or security keys)" is enabled in |
| 399 | "Show Options \> Local Resources \> More…" (refer to screenshots below). Then |
| 400 | connect to the remote Windows machine as usual. |
| 401 | |
| 402 |  |
| 403 | |
| 404 |  |
| 405 | |
| 406 | Then, in the remote desktop session, run the following command in command prompt |
| 407 | (CMD): |
| 408 | |
| 409 | ```shell |
| 410 | git credential-luci reauth |
| 411 | ``` |
| 412 | |
| 413 | Windows will prompt you to touch the security key. Touch it to complete ReAuth. |
| 414 | |
| 415 | If you see "ReAuth succeed", then it works\! |
| 416 | |
| Jiewei Qian | 0c6c414 | 2025-10-02 03:23:03 | [diff] [blame] | 417 | ### None of the above |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 418 | |
| 419 | SSH / remote desktop workflows not listed above aren’t tested. We’re working on |
| 420 | adding instructions for more workflows. |
| 421 | |
| 422 | If you have suggestions or feedback, please report to: |
| 423 | [https://issues.chromium.org/issues/new?component=1456702&template=2176581](https://issues.chromium.org/issues/new?component=1456702&template=2176581). |
| 424 | |
| 425 | ## Troubleshooting |
| 426 | |
| 427 | Please set `LUCI_AUTH_DEBUG` environment variable to enable debug logs. |
| 428 | |
| 429 | In Linux / Mac, run: |
| 430 | |
| 431 | ``` |
| 432 | export LUCI_AUTH_DEBUG=1 |
| 433 | ``` |
| 434 | |
| 435 | In Windows (CMD), run: |
| 436 | |
| 437 | ``` |
| 438 | set LUCI_AUTH_DEBUG=1 |
| 439 | ``` |
| 440 | |
| 441 | Then, retry the failed command (e.g. `git credential-luci reauth`). |
| 442 | |
| 443 | If you run into issues, please report to |
| Allen Li | 61a86a96 | 2025-09-23 21:25:41 | [diff] [blame] | 444 | [https://issues.chromium.org/issues/new?component=1456702&template=2176581](https://issues.chromium.org/issues/new?component=1456702&template=2176581) |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 445 | |
| 446 | **Please be sure to include**: |
| 447 | |
| 448 | - The debug logs produced by setting `LUCI_AUTH_DEBUG` |
| 449 | - The security key you're using (e.g. manufacturer, model, etc.) |
| 450 | - Whether the security key is registered as a FIDO2 or U2F key (see |
| 451 | [Prerequisites](#prerequisites)) |
| Jiewei Qian | 91bc65f | 2025-10-21 03:51:13 | [diff] [blame] | 452 | - The following environment variables: `SSH_AUTH_SOCK`, `SSH_CONNECTION` and |
| 453 | `GOOGLE_AUTH_WEBAUTHN_PLUGIN` |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 454 | |
| 455 | Note, when sharing debug logs, please edit out the value after `Signature:` |
| 456 | field (if it's present) and any other values if you wish. |
| 457 | |
| 458 | ## FAQs |
| 459 | |
| Jiewei Qian | 91bc65f | 2025-10-21 03:51:13 | [diff] [blame] | 460 | **ReAuth in `screen`, `tmux`, `shpool`, etc.** |
| 461 | You need to manually set `GOOGLE_AUTH_WEBAUTHN_PLUGIN` environment variable for |
| 462 | ReAuth to work. This is in addition to the instructions above. |
| 463 | |
| 464 | If you're a Googler, follow |
| 465 | [the internal guide](go/gerrit-reauth#bookmark=id.gohr0ejjvi49). |
| 466 | |
| 467 | Otherwise, set the environment variable depending on your situation: |
| 468 | |
| Allen Li | d1b4da8 | 2025-11-10 23:08:45 | [diff] [blame] | 469 | * Inside `screen`, etc., running locally: |
| 470 | `GOOGLE_AUTH_WEBAUTHN_PLUGIN=luci-auth-fido2-plugin` |
| 471 | * Inside `screen`, etc., running remotely with `luci-auth-ssh-helper`: |
| 472 | `GOOGLE_AUTH_WEBAUTHN_PLUGIN=luci-auth-ssh-plugin` |
| Jiewei Qian | 91bc65f | 2025-10-21 03:51:13 | [diff] [blame] | 473 | |
| 474 | Then run `git credential-luci reauth`. |
| 475 | |
| Jiewei Qian | d76b2b33 | 2025-08-29 01:37:40 | [diff] [blame] | 476 | **I accidentally shared the `Signature:` in the debug logs\!** |
| 477 | |
| 478 | Do not worry too much if you share this. This can be used in a very small time |
| 479 | frame to exchange for a token that only lasts for 20 hours, and both the |
| 480 | exchange and any subsequent use of the token also requires your actual/regular |
| 481 | credentials in addition to the token. Furthermore, as of this writing, no |
| 482 | actions can be authorized with this token yet. |
| 483 | |
| 484 | Of course, we do recommend avoiding sharing this as a general safety precaution. |
| 485 | |
| 486 | **Can I use other forms of 2-Step Verification (2SV)?** |
| 487 | |
| 488 | For ReAuth: No. You must use a physical security key. SMS, authenticator app, |
| 489 | passkeys won't satisfy ReAuth requirement (e.g. when uploading code, doing code |
| 490 | reviews). |
| 491 | |
| 492 | You can still add and use other 2SV methods to sign into your Google account. |
| Andrew Mitchell | 771d922 | 2025-09-03 04:25:09 | [diff] [blame] | 493 | |
| 494 | **What should I expect to see when ReAuth is required?** |
| 495 | |
| 496 | ReAuth is required every 20 hours. When ReAuth is required you will see the |
| 497 | following error when performing Gerrit remote operations like uploading CLs: |
| 498 | |
| 499 | ``` |
| 500 | ReAuth is required |
| 501 | |
| 502 | If you are running this in a development environment, you can fix this by running: |
| 503 | |
| 504 | git credential-luci reauth |
| 505 | ``` |
| 506 | |
| 507 | You will need to run `git credential-luci reauth` every 20 hours to avoid or |
| 508 | resolve this issue. We recommend you ReAuth when you start your day. |