{
  "id": "terraform/module-source-not-found-git",
  "signature": "Error: Failed to download module: could not download module \"my_module\" (main.tf:1) source code from \"git::https://github.com/myorg/terraform-modules.git//networking?ref=v1.0\": error downloading 'https://github.com/myorg/terraform-modules.git': git clone failed: remote: Repository not found.",
  "signature_zh": "错误：下载模块失败：无法从 \"git::https://github.com/myorg/terraform-modules.git//networking?ref=v1.0\" 下载模块 \"my_module\"（main.tf:1）的源代码：下载 'https://github.com/myorg/terraform-modules.git' 时出错：git clone 失败：远程：未找到仓库。",
  "regex": "Error: Failed to download module: could not download module \".*\" \\(.*\\) source code from \"git::https://.*\\.git.*\": error downloading 'https://.*\\.git': git clone failed: remote: Repository not found\\.|remote: Not Found",
  "domain": "terraform",
  "category": "install_error",
  "subcategory": null,
  "root_cause": "The Git repository specified in the module source does not exist, is private without proper authentication, or the URL is incorrect (e.g., typo, wrong org name).",
  "root_cause_type": "generic",
  "root_cause_zh": "模块源中指定的 Git 仓库不存在、是私有的且没有正确认证，或者 URL 不正确（例如拼写错误、错误的组织名称）。",
  "versions": [
    {
      "version": "Terraform v1.5",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.6",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Terraform v1.7",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Git v2.30+",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "In non-interactive CI/CD environments, there is no terminal for password input. Also, Git credentials should be configured via SSH keys or tokens, not interactive prompts.",
      "fail_rate": 0.9,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "SSH access requires proper SSH keys configured in the environment. Without keys, SSH also fails with 'Permission denied'.",
      "fail_rate": 0.85,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "The -from-module flag is for migrating state, not for fixing module download errors. It does not affect source URL resolution.",
      "fail_rate": 0.95,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Verify the repository URL is correct by manually cloning it: 'git clone https://github.com/myorg/terraform-modules.git'. If it fails, check for typos or access permissions. For private repos, use a personal access token: 'git clone https://<token>@github.com/myorg/terraform-modules.git' or configure git credentials. Then run 'terraform init' again.",
      "success_rate": 0.85,
      "how": "Verify the repository URL is correct by manually cloning it: 'git clone https://github.com/myorg/terraform-modules.git'. If it fails, check for typos or access permissions. For private repos, use a personal access token: 'git clone https://<token>@github.com/myorg/terraform-modules.git' or configure git credentials. Then run 'terraform init' again.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If the repo is private, set up Git credentials via environment variable: 'export GIT_TERMINAL_PROMPT=0' and 'export GIT_ASKPASS=/path/to/helper' or use SSH authentication. Example: 'export GIT_SSH_COMMAND=\"ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=accept-new\"' then 'terraform init'.",
      "success_rate": 0.75,
      "how": "If the repo is private, set up Git credentials via environment variable: 'export GIT_TERMINAL_PROMPT=0' and 'export GIT_ASKPASS=/path/to/helper' or use SSH authentication. Example: 'export GIT_SSH_COMMAND=\"ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=accept-new\"' then 'terraform init'.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Verify the repository URL is correct by manually cloning it: 'git clone https://github.com/myorg/terraform-modules.git'. If it fails, check for typos or access permissions. For private repos, use a personal access token: 'git clone https://<token>@github.com/myorg/terraform-modules.git' or configure git credentials. Then run 'terraform init' again.",
    "If the repo is private, set up Git credentials via environment variable: 'export GIT_TERMINAL_PROMPT=0' and 'export GIT_ASKPASS=/path/to/helper' or use SSH authentication. Example: 'export GIT_SSH_COMMAND=\"ssh -i ~/.ssh/id_rsa -o StrictHostKeyChecking=accept-new\"' then 'terraform init'."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://developer.hashicorp.com/terraform/language/modules/sources#git",
  "official_doc_section": null,
  "error_code": null,
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.8,
  "resolvable": "partial",
  "first_seen": "2023-07-22",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}