{"record":{"id":"7efb13dedaf39c42","repo":"nodejs/node","slug":"git-s-failed","errorCode":null,"errorMessage":"'git %s' failed.","messagePattern":"'git (.+?)' failed\\.","errorType":"exception","errorClass":"GitFailedException","httpStatus":null,"severity":"error","filePath":"deps/v8/tools/release/common_includes.py","lineNumber":406,"sourceCode":"  def ReadLine(self, default=None):\n    # Don't prompt in forced mode.\n    if self._options.force_readline_defaults and default is not None:\n      print(\"%s (forced)\" % default)\n      return default\n    else:\n      return self._side_effect_handler.ReadLine()\n\n  def Command(self, name, args, cwd=None):\n    cmd = lambda: self._side_effect_handler.Command(\n        name, args, \"\", True, cwd=cwd or self.default_cwd)\n    return self.Retry(cmd, None, [5])\n\n  def Git(self, args=\"\", prefix=\"\", pipe=True, retry_on=None, cwd=None):\n    cmd = lambda: self._side_effect_handler.Command(\n        \"git\", args, prefix, pipe, cwd=cwd or self.default_cwd)\n    result = self.Retry(cmd, retry_on, [5, 30])\n    if result is None:\n      raise GitFailedException(\"'git %s' failed.\" % args)\n    return result\n\n  def Editor(self, args):\n    if self._options.requires_editor:\n      return self._side_effect_handler.Command(\n          os.environ[\"EDITOR\"],\n          args,\n          pipe=False,\n          cwd=self.default_cwd)\n\n  def ReadURL(self, url, params=None, retry_on=None, wait_plan=None):\n    wait_plan = wait_plan or [3, 60, 600]\n    cmd = lambda: self._side_effect_handler.ReadURL(url, params)\n    return self.Retry(cmd, retry_on, wait_plan)\n\n  def Die(self, msg=\"\"):\n    if msg != \"\":\n      print(\"Error: %s\" % msg)","sourceCodeStart":388,"sourceCodeEnd":424,"githubUrl":"https://github.com/nodejs/node/blob/1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e/deps/v8/tools/release/common_includes.py#L388-L424","documentation":"Git() wraps the side_effect_handler.Command in Retry and expects a non-None result. If the underlying call returns None/falsy after retries, Git raises GitFailedException formatted with the git args string. The real git stderr was already printed by the side effect handler.","triggerScenarios":"Any self.Git(...) call where the underlying git command fails to produce a result after retries.","commonSituations":"Bad ref/branch/tag name; auth/SSH failure on a private remote; missing remote; corrupt repo; network blip longer than the retry window.","solutions":["Run the same `git <args>` manually in the repo (default_cwd) to see the real error.","Verify the referenced refs/branches/remotes exist.","Run `git fsck` / re-clone if the repo is corrupt.","Check credentials/SSH for private remotes."],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"# Pre-flight: confirm the refs the script will touch exist locally.\nimport subprocess\nsubprocess.run(['git', 'rev-parse', '--verify', ref], check=True, cwd=repo)","typeGuard":null,"tryCatchPattern":"try:\n    out = self.Git(args)\nexcept GitFailedException as e:\n    log.error('git %s failed: %s', args, e)\n    raise","preventionTips":["Run `git fetch` before release scripts so refs are present.","Validate remotes/credentials before bulk git operations.","Use NoRetryException for permanent git errors (bad ref)."],"tags":["git","release-tools","v8","retry","subprocess"],"backgroundTag":null,"analyzedSha":"1b2de5e052fc0fb95fd7fb6846dcec4ade598e9e","analyzedAt":"2026-08-13T00:53:24.642Z","schemaVersion":2},"datasetVersion":"2026-08-13T04:17:16.726Z"}