Search code examples
gitlabgoogle-chrome-devtools

How to add China region option in Chrome to GitLab's phone number verification when registering?


When registering a new user with GitLab, there is no China region option for phone number verification. How to add China region option (+86) using DevTools in Chrome?


Solution

  • EDIT: Just to be sure, you know JiHu Gitlab exists?

    Disclaimer: I have no idea if this works, as I only have a US phone number, and it depends on Gitlabs method of sending texts. It is worth a try, though.

    1. Right click over the "Country or region" that is selected, as shown here: enter image description here

    On the right side, you will see this element:

    <span class="gl-new-dropdown-button-text">
            🇹🇼 Taiwan (+886)
          </span>
    

    and you can double click on 🇹🇼 Taiwan (+886) to edit it. Change this to CH China (+86) and click enter. That should change the selection to display China

    2. Right click over the Country Code (+1 in my case) and click Inspect, as shown here:

    enter image description here

    This will open up the Chrome dev tools on the side, highlighted over the desired element that you want to change. Notice it is currently highlighting the line with <div class="input-group-text"> +1 </div>; that is the line you want to change.

    Simply double click on the "+1" and change it to "+86". Click enter on your keyboard. This will change the leading number to 86 instead of 1, and look like this:

    enter image description here

    I was able to change it from "+1" to "1" in dev tools and it still worked for me, so I have a feeling theres a chance this could work. Let me know your results.

    EDIT 2: if the above does not work, it looks like Gitlab sometimes requires a phone number, and sometimes doesn't, based on this forum. It uses Arkose which detects risks to the platform; this "risk" score determines if a phone number is required. If you are in China, you'll likely be flagged because it seems normal Gitlab is unavailable in China; if you are on VPN, you are probably on a more "risky" IP according to Arkose. Your best bet would probably be getting an account made with your email from a less risky IP/device outside of China, if possible.