GitHub Connector
The GitHub connector allows workloads to access GitHub through the Connectors proxy model.
Core Fields
Example connector:
spec.connectorClassName: constant valuegithubspec.address: GitHub server URL used for Git operations (e.g.,https://github.com)spec.addressExtensions[api]: API endpoint override. When the host ishttps://github.com, set this tohttps://api.github.com; otherwise leave unset
Note: GitHub Enterprise is not supported at this time.
Authentication
Supported auth type:
patAuth(optional)- Secret type:
Opaque
Secret example:
Configurations
Built-in configuration files from ConnectorClass:
gitconfig: used by Git CLI (URL rewrite and auth header via the built-in reverse proxy)githubconfig: used byghCLI (GitHub CLI), providesconfig.yml,hosts.yml, andca.cert. Requires forward proxy —hosts.ymluses a placeholder token; real authentication is injected by the Connectors forward proxy. You must set the forward proxy environment variables forghCLI to authenticate correctly.
Using githubconfig with Forward Proxy
When you mount githubconfig via the Connectors CSI Driver, the CSI Driver automatically provides a built-in .env file containing http_proxy, https_proxy, and no_proxy settings in the same mount directory. To use githubconfig:
- Mount the CSI volume with
configuration.names: "githubconfig" - Set
GH_CONFIG_DIRto the mount path soghCLI readsconfig.ymlandhosts.yml - Source the
.envfile to set forward proxy environment variables - Configure TLS trust for the proxy certificate (required when HTTPS forward proxy is used, such as a MITM-style proxy)
Example:
For more details on the built-in .env file and forward proxy configuration, see Connectors CSI Driver — Built-in Configurations.
When your environment enforces TLS interception through an HTTPS forward proxy, make sure SSL_CERT_FILE points to the mounted ca.cert; otherwise, gh requests may fail with certificate verification errors.