This issue is caused by the combination of the older version of Git installed by Yum on CentOS (1.8.3.1-6 at the time of this writing) and Git's two-factor authentication mechanism.
Git's 2FA is the reason the hanging occurs in the first place, since one of the packages Yarn was attempting to fetch was a private repo via HTTPS (see here for details).
The version of the Git client in CentOS turned out to be the reason the hanging continued to occur and never timed / erred out. That is, the aforementioned version of Git on CentOS prevented Yarn from recognizing the authentication error and exiting accordingly.
The solution is to upgrade Git to a more recent version using a different repo:
sudo yum -y erase git
sudo rpm -U http://opensource.wandisco.com/centos/7/git/x86_64/wandisco-git-release-7-2.noarch.rpm
sudo yum -y install git
This will stop Yarn from continuing to hang, with an output similar to the following:
[1/4] Resolving packages...
[2/4] Fetching packages...
error Command failed.
Exit code: 128
Command: git
...
fatal: could not read Username for 'https://github.com': terminal prompts disabled