def METHOD_NAME(remote_name: str) -> tuple[str, str] | tuple[None, None]:
    # No CNAME found.  We will use the origin URL to determine the GitHub
    # Pages location.
    remote = f"remote.{remote_name}.url"
    proc = subprocess.Popen(
        ["git", "config", "--get", remote],
        stdout=subprocess.PIPE,
        stderr=subprocess.PIPE,
    )
    stdout, _ = proc.communicate()
    url = stdout.decode('utf-8').strip()
    if 'github.com/' in url:
        host, path = url.split('github.com/', 1)
    elif 'github.com:' in url:
        host, path = url.split('github.com:', 1)
    else:
        return None, None
    return host, path