unslothai/unsloth · error · RuntimeError
Timed out while installing the pinned {source_name} source
Error message
Timed out while installing the pinned {source_name} source What it means
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.
Source
Thrown at studio/backend/utils/third_party_source.py:137
env["GIT_TERMINAL_PROMPT"] = "0"
env["GIT_LFS_SKIP_SMUDGE"] = "1"
env["GIT_NO_REPLACE_OBJECTS"] = "1"
try:
return subprocess.run(
["git", *_GIT_LONG_PATHS, *arguments],
check = True,
capture_output = True,
text = True,
encoding = "utf-8",
errors = "replace",
timeout = 300,
env = env,
**_windows_hidden_subprocess_kwargs(),
)
except FileNotFoundError as error:
raise RuntimeError(f"Git is required to install the pinned {source_name} source") from error
except subprocess.TimeoutExpired as error:
raise RuntimeError(f"Timed out while installing the pinned {source_name} source") from error
except subprocess.CalledProcessError as error:
detail = (error.stderr or error.stdout or "").strip()
message = f"Could not install the pinned {source_name} source"
raise RuntimeError(f"{message}: {detail}" if detail else message) from error
def _git_bytes(
arguments: list[str], *, source_name: str, input_data: bytes
) -> subprocess.CompletedProcess:
env = child_env_without_native_path_secret()
env["GIT_TERMINAL_PROMPT"] = "0"
env["GIT_LFS_SKIP_SMUDGE"] = "1"
env["GIT_NO_REPLACE_OBJECTS"] = "1"
try:
return subprocess.run(
["git", *_GIT_LONG_PATHS, *arguments],
check = True,
capture_output = True,View on GitHub (pinned to 203007d190)
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.
Defensive patterns
Strategy: retry
Try / catch
try:
install_pinned_source(source)
except RuntimeError as e:
if 'Timed out while installing' in str(e):
log.warning('git fetch timed out (300s cap); retrying once')
install_pinned_source(source)
else:
raise Prevention
- 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.
When it happens
Trigger: 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.
Common situations: 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.
Understand the failure class
- Timeouts: ETIMEDOUT, deadlines, and hung requests — what actually expires when a request times out.
Related errors
- installer timed out after {timeout_seconds}s
- Git is required to install the pinned {source_name} source
- Could not install the pinned {source_name} source: {detail}
- Could not reach ChatGPT authentication.
- GraphQL failed after {max_retries} retries: {last_err}
AI-assisted analysis of unslothai/unsloth@203007d190 (2026-08-15).
Data as JSON: /api/errors/71fe8bc50c8d77b0.
Report an issue: GitHub.