{
  "id": "cicd/jenkins-pipeline-git-checkout-failed",
  "signature": "stderr: fatal: unable to access 'https://github.com/org/repo.git/': Could not resolve host: github.com",
  "signature_zh": "标准错误：致命错误：无法访问 'https://github.com/org/repo.git/'：无法解析主机：github.com",
  "regex": "fatal: unable to access .*: Could not resolve host:",
  "domain": "cicd",
  "category": "network_error",
  "subcategory": null,
  "root_cause": "Jenkins pipeline fails to clone a Git repository because the Jenkins agent cannot resolve the hostname due to DNS misconfiguration, network proxy settings, or the agent being in a restricted network environment.",
  "root_cause_type": "generic",
  "root_cause_zh": "Jenkins 管道无法克隆 Git 仓库，因为 Jenkins 代理由于 DNS 配置错误、网络代理设置或代理处于受限网络环境中而无法解析主机名。",
  "versions": [
    {
      "version": "Jenkins 2.440.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Jenkins 2.450.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    },
    {
      "version": "Git plugin 5.2.x",
      "introduced": null,
      "deprecated": null,
      "removed": null,
      "behavior_change": null,
      "status": "active"
    }
  ],
  "os_specific": {},
  "dead_ends": [
    {
      "action": "",
      "why_fails": "Adding `github.com` to the `/etc/hosts` file on the agent may work temporarily but fails if the IP address changes, and does not address the root cause of DNS resolution failure.",
      "fail_rate": 0.7,
      "condition": "",
      "sources": []
    },
    {
      "action": "",
      "why_fails": "Changing the Git URL from HTTPS to SSH does not resolve DNS issues; SSH also requires hostname resolution and may introduce additional authentication failures.",
      "fail_rate": 0.8,
      "condition": "",
      "sources": []
    }
  ],
  "workarounds": [
    {
      "action": "Configure the Jenkins agent to use a specific DNS server by setting JVM arguments: `-Djava.security.policy=/path/to/policy -Dnetworkaddress.cache.ttl=60` and ensure the agent's `/etc/resolv.conf` contains valid DNS servers like `8.8.8.8`.",
      "success_rate": 0.85,
      "how": "Configure the Jenkins agent to use a specific DNS server by setting JVM arguments: `-Djava.security.policy=/path/to/policy -Dnetworkaddress.cache.ttl=60` and ensure the agent's `/etc/resolv.conf` contains valid DNS servers like `8.8.8.8`.",
      "condition": "",
      "sources": []
    },
    {
      "action": "If behind a proxy, configure Git to use the proxy: `git config --global http.proxy http://proxy.example.com:8080` and `git config --global https.proxy http://proxy.example.com:8080` in the pipeline script before checkout.",
      "success_rate": 0.8,
      "how": "If behind a proxy, configure Git to use the proxy: `git config --global http.proxy http://proxy.example.com:8080` and `git config --global https.proxy http://proxy.example.com:8080` in the pipeline script before checkout.",
      "condition": "",
      "sources": []
    }
  ],
  "workarounds_zh": [
    "Configure the Jenkins agent to use a specific DNS server by setting JVM arguments: `-Djava.security.policy=/path/to/policy -Dnetworkaddress.cache.ttl=60` and ensure the agent's `/etc/resolv.conf` contains valid DNS servers like `8.8.8.8`.",
    "If behind a proxy, configure Git to use the proxy: `git config --global http.proxy http://proxy.example.com:8080` and `git config --global https.proxy http://proxy.example.com:8080` in the pipeline script before checkout."
  ],
  "transition_graph": {
    "leads_to": [],
    "preceded_by": [],
    "frequently_confused_with": []
  },
  "official_doc_url": "https://www.jenkins.io/doc/book/pipeline/scm/",
  "official_doc_section": null,
  "error_code": "JENKINS_GIT_DNS",
  "verification_tier": "ai_generated",
  "confidence": 0.85,
  "fix_success_rate": 0.82,
  "resolvable": "true",
  "first_seen": "2024-02-10",
  "last_confirmed": "2024-06-01",
  "last_updated": "2024-06-01",
  "evidence_count": 1,
  "tags": [],
  "locale": "en",
  "aliases": []
}