# Error: Failed to connect to github.com port 443: Connection timed out

- **ID:** `cicd/github-actions-connect-timeout`
- **Domain:** cicd
- **Category:** network_error
- **Error Code:** `CONNECTION_TIMEOUT`
- **Verification:** ai_generated
- **Fix Rate:** 80%

## Root Cause

GitHub Actions runner cannot reach github.com due to DNS resolution failures, firewall rules, or proxy misconfiguration in the runner environment.

## Version Compatibility

| Version | Status | Introduced | Deprecated |
|---------|--------|------------|------------|
| GitHub Actions Runner 2.308.0 | active | — | — |
| Ubuntu 22.04 | active | — | — |
| Windows Server 2022 | active | — | — |

## Workarounds

1. **Configure proxy environment variables on the runner: export http_proxy=http://proxy.example.com:8080; export https_proxy=http://proxy.example.com:8080; export no_proxy=localhost,127.0.0.1** (85% success)
   ```
   Configure proxy environment variables on the runner: export http_proxy=http://proxy.example.com:8080; export https_proxy=http://proxy.example.com:8080; export no_proxy=localhost,127.0.0.1
   ```
2. **Update DNS resolver on the runner host: echo 'nameserver 8.8.8.8' > /etc/resolv.conf** (75% success)
   ```
   Update DNS resolver on the runner host: echo 'nameserver 8.8.8.8' > /etc/resolv.conf
   ```
3. **Check firewall rules to allow outbound HTTPS (port 443) to github.com IP ranges: nslookup github.com; sudo ufw allow out on eth0 to any port 443 proto tcp** (80% success)
   ```
   Check firewall rules to allow outbound HTTPS (port 443) to github.com IP ranges: nslookup github.com; sudo ufw allow out on eth0 to any port 443 proto tcp
   ```

## Dead Ends

- **Restarting the runner service without checking network connectivity** — The underlying network issue persists after restart; runner will hit the same timeout on next job. (95% fail)
- **Adding more retries via workflow configuration (e.g., 'retry-on-error: true')** — GitHub Actions retries only the step, not the underlying TCP connection; connection timeout is fatal and not recoverable by retrying the step. (90% fail)
- **Clearing runner cache and reinstalling the runner agent** — The runner agent itself is functional; the issue is at the network layer, not the agent software. (85% fail)
