{"record":{"id":"71fe8bc50c8d77b0","repo":"unslothai/unsloth","slug":"timed-out-while-installing-the-pinned-source-name","errorCode":null,"errorMessage":"Timed out while installing the pinned {source_name} source","messagePattern":"Timed out while installing the pinned (.+?) source","errorType":"exception","errorClass":"RuntimeError","httpStatus":null,"severity":"error","filePath":"studio/backend/utils/third_party_source.py","lineNumber":137,"sourceCode":"    env[\"GIT_TERMINAL_PROMPT\"] = \"0\"\n    env[\"GIT_LFS_SKIP_SMUDGE\"] = \"1\"\n    env[\"GIT_NO_REPLACE_OBJECTS\"] = \"1\"\n    try:\n        return subprocess.run(\n            [\"git\", *_GIT_LONG_PATHS, *arguments],\n            check = True,\n            capture_output = True,\n            text = True,\n            encoding = \"utf-8\",\n            errors = \"replace\",\n            timeout = 300,\n            env = env,\n            **_windows_hidden_subprocess_kwargs(),\n        )\n    except FileNotFoundError as error:\n        raise RuntimeError(f\"Git is required to install the pinned {source_name} source\") from error\n    except subprocess.TimeoutExpired as error:\n        raise RuntimeError(f\"Timed out while installing the pinned {source_name} source\") from error\n    except subprocess.CalledProcessError as error:\n        detail = (error.stderr or error.stdout or \"\").strip()\n        message = f\"Could not install the pinned {source_name} source\"\n        raise RuntimeError(f\"{message}: {detail}\" if detail else message) from error\n\n\ndef _git_bytes(\n    arguments: list[str], *, source_name: str, input_data: bytes\n) -> subprocess.CompletedProcess:\n    env = child_env_without_native_path_secret()\n    env[\"GIT_TERMINAL_PROMPT\"] = \"0\"\n    env[\"GIT_LFS_SKIP_SMUDGE\"] = \"1\"\n    env[\"GIT_NO_REPLACE_OBJECTS\"] = \"1\"\n    try:\n        return subprocess.run(\n            [\"git\", *_GIT_LONG_PATHS, *arguments],\n            check = True,\n            capture_output = True,","sourceCodeStart":119,"sourceCodeEnd":155,"githubUrl":"https://github.com/unslothai/unsloth/blob/203007d19051dcd2ae33876786d117c99f6b0368/studio/backend/utils/third_party_source.py#L119-L155","documentation":"Raised by _git() when the git subprocess exceeds its hard 300-second timeout (subprocess.TimeoutExpired). The installer runs each git operation with timeout=300, so a slow clone, a hung network connection, or an LFS-heavy fetch that cannot finish in five minutes aborts with this error naming the pinned source.","triggerScenarios":"Cloning/fetching a large pinned repository over a slow or stalled link where the git command does not complete within 300s; GIT_LFS_SKIP_SMUDGE=1 is set so LFS content is skipped, so timeouts usually mean a big working tree or a wedged connection.","commonSituations":"Slow/high-latency networks, proxied corporate environments, GitHub throttling, or very large pinned sources. Recurs if the repository genuinely needs more than five minutes on the available bandwidth.","solutions":["Check network throughput to the git host and retry — most timeouts are transient stalls.","Pre-clone the pinned source manually (git clone with generous time) into the expected cache location so the installer finds it and only runs cheap checkout operations.","If on a proxy, ensure git's http.proxy is configured for the backend's environment.","As a maintainer, raise the 300s timeout for large repos; as a user, retry when the network is less loaded."],"exampleFix":null,"handlingStrategy":"retry","validationCode":null,"typeGuard":null,"tryCatchPattern":"try:\n    install_pinned_source(source)\nexcept RuntimeError as e:\n    if 'Timed out while installing' in str(e):\n        log.warning('git fetch timed out (300s cap); retrying once')\n        install_pinned_source(source)\n    else:\n        raise","preventionTips":["Pre-clone large pinned repos manually into the cache so the installer only does checkouts.","Ensure stable, unthrottled network (or a configured git proxy) before starting installs.","Remember every git op has a hard 300s ceiling — plan payloads and bandwidth accordingly."],"tags":["git","timeout","network","dependency-install","python"],"backgroundTag":null,"analyzedSha":"203007d19051dcd2ae33876786d117c99f6b0368","analyzedAt":"2026-08-15T02:48:39.846Z","schemaVersion":2},"datasetVersion":"2026-08-15T17:31:12.345Z"}