egametang/ET · error · Exception

clone hybridclr fail. url: {hybridclrRepoURL}

Error message

clone hybridclr fail. url: {hybridclrRepoURL}

What it means

Thrown by InstallerController.PrepareLibil2cppWithHybridclrFromGitRepo after CloneBranch returns but the hybridclr repository target directory does not exist. The installer clones the hybridclr runtime source from a configurable Git URL and expects the checkout to materialize on disk.

Source

Thrown at Packages/cn.etetet.hybridclr/Scripts/Editor/Share/Installer/InstallerController.cs:234

        {
            BashUtil.RemoveDir(repoDir);
            BashUtil.RunCommand(workDir, "git", new string[] {"clone", "-b", branch, "--depth", "1", repoUrl, repoDir});
        }

        private string PrepareLibil2cppWithHybridclrFromGitRepo()
        {
            string workDir = SettingsUtil.HybridCLRDataDir;
            Directory.CreateDirectory(workDir);
            //BashUtil.RecreateDir(workDir);

            // clone hybridclr
            string hybridclrRepoURL = HybridCLRSettings.Instance.hybridclrRepoURL;
            string hybridclrRepoDir = $"{workDir}/{hybridclr_repo_path}";
            CloneBranch(workDir, hybridclrRepoURL, _curDefaultVersion.hybridclr.branch, hybridclrRepoDir);

            if (!Directory.Exists(hybridclrRepoDir))
            {
                throw new Exception($"clone hybridclr fail. url: {hybridclrRepoURL}");
            }

            // clone il2cpp_plus
            string il2cppPlusRepoURL = HybridCLRSettings.Instance.il2cppPlusRepoURL;
            string il2cppPlusRepoDir = $"{workDir}/{il2cpp_plus_repo_path}";
            CloneBranch(workDir, il2cppPlusRepoURL, _curDefaultVersion.il2cpp_plus.branch, il2cppPlusRepoDir);

            if (!Directory.Exists(il2cppPlusRepoDir))
            {
                throw new Exception($"clone il2cpp_plus fail. url: {il2cppPlusRepoDir}");
            }

            Directory.Move($"{hybridclrRepoDir}/hybridclr", $"{il2cppPlusRepoDir}/libil2cpp/hybridclr");
            return $"{il2cppPlusRepoDir}/libil2cpp";
        }

        public void InstallFromLocal(string libil2cppWithHybridclrSourceDir)
        {

View on GitHub (pinned to 5cab01f7a8)

Solutions

  1. Verify git is installed and on PATH (run git --version from the same environment).
  2. Open HybridCLR Settings and confirm hybridclrRepoURL points to a reachable repository (default is the public GitHub mirror).
  3. If behind a proxy, configure git http.proxy or set the HTTPS_PROXY environment variable before running the installer.
  4. For private mirrors, ensure SSH keys or tokens are configured; alternatively use InstallFromLocal with a pre-cloned source directory.
Defensive patterns

Strategy: retry

Validate before calling

// Pre-flight: confirm the repo URL is set
if (string.IsNullOrEmpty(HybridCLRSettings.Instance.hybridclrRepoURL))
    Debug.LogError("hybridclrRepoURL is empty in HybridCLR settings.");

Try / catch

try
{
    installer.CloneBranch(workDir, repoUrl, branch, destDir);
}
catch
{
    // Retry with explicit proxy env or fall back to InstallFromLocal
}

Prevention

When it happens

Trigger: CloneBranch(workDir, hybridclrRepoURL, branch, hybridclrRepoDir) is called but the resulting directory is absent. Common when git clone fails: network error, unreachable host, wrong URL, authentication failure, or git not on PATH.

Common situations: Corporate firewall/proxy blocking GitHub; HybridCLRSettings.hybridclrRepoURL was customized to a private mirror without credentials; git is not installed or not on PATH in a headless/CI environment; the target disk is full or read-only.

Related errors


AI-assisted analysis of egametang/ET@5cab01f7a8 (2026-08-13). Data as JSON: /api/errors/db86cc9fd796affb. Report an issue: GitHub.