jdx/mise · error
GitHub Actions OIDC request URL must use HTTPS
Error message
GitHub Actions OIDC request URL must use HTTPS
What it means
The GitHub Actions OIDC token request URL is validated to require HTTPS unless it is a loopback address. A non-HTTPS, non-loopback URL would send OIDC secrets over plaintext, so it is rejected outright.
Solutions
- Change the URL scheme to https:// (e.g. https://token.actions.githubusercontent.com)
- If developing locally, use a loopback host like http://127.0.0.1:PORT which is explicitly allowed
- Put TLS in front of your token proxy (reverse proxy with certificates) instead of plain HTTP
- Check environment overrides for the OIDC URL for stray http:// values
Example fix
// before
let url = Url::parse("http://token.internal.example.com")?;
// after
let url = Url::parse("https://token.internal.example.com")?; Defensive patterns
Strategy: validation
Validate before calling
let url = Url::parse(oidc_url)?;
if url.scheme() != "https" {
let loopback = matches!(url.host(), Some(url::Host::Ipv4(a)) if a.is_loopback());
if !loopback {
return Err("OIDC URL must be HTTPS".into());
}
} Type guard
fn is_https_or_loopback(url: &Url) -> bool {
url.scheme() == "https"
|| matches!(url.host(),
Some(url::Host::Ipv4(a)) if a.is_loopback())
} Try / catch
if let Err(e) = validate_github_oidc_url(&url) {
eprintln!("config error: {e}; set https://token.actions.githubusercontent.com");
} Prevention
- Never hand-write the OIDC URL; derive it from ACTIONS_ID_TOKEN_REQUEST_URL
- Put TLS on any custom token proxy
- Review CI env overrides for http:// values
When it happens
Trigger: validate_github_oidc_url (or equivalent) receives a request URL whose scheme is not https and whose host is not a loopback IPv4/IPv6 address — e.g. http://token.example.com or a plain hostname.
Common situations: Typo in the OIDC endpoint URL, self-hosted token proxy exposed over HTTP, misconfigured ACTIONS_ID_TOKEN_REQUEST_URL override in CI, pointing at an internal http:// service.
Understand the failure class
Background: "Invalid URL" errors: why new URL(), URI.parse, and reqwest::Url reject your string — missing scheme, whitespace, and bad path format — this error's family across 39 libraries.
Related errors
- Python locks require credential-free HTTP artifact URLs…
- remote cache URL must use HTTPS except for loopback…
- repository origin must not contain credentials, query…
- self_update.api_url must use HTTPS, got
- setup repository URLs must not contain credentials, query…
AI-assisted analysis of jdx/mise@533346cc37 (2026-09-17).
Data as JSON: /api/errors/07283582b98ab450.
Report an issue: GitHub.
Appendix: source
Thrown at crates/mise-cache-core/src/lib.rs:1103
fn unix_timestamp() -> Result<u64> {
Ok(SystemTime::now()
.duration_since(UNIX_EPOCH)
.map_err(|err| eyre!("system clock is before the Unix epoch: {err}"))?
.as_secs())
}
fn validate_oidc_request_url(url: &Url) -> Result<()> {
if url.scheme() == "https"
|| url.scheme() == "http"
&& url.host().is_some_and(|host| match host {
Host::Domain(host) => host.eq_ignore_ascii_case("localhost"),
Host::Ipv4(address) => address.is_loopback(),
Host::Ipv6(address) => address.is_loopback(),
})
{
Ok(())
} else {
bail!("GitHub Actions OIDC request URL must use HTTPS")
}
}
fn validate_remote_url(base_url: &Url, authenticated: bool) -> Result<()> {
if base_url.scheme() == "https" {
return Ok(());
}
if base_url.scheme() != "http" {
bail!("remote cache URL must use HTTPS");
}
let is_loopback = base_url.host().is_some_and(|host| match host {
Host::Domain(host) => host.eq_ignore_ascii_case("localhost"),
Host::Ipv4(address) => address.is_loopback(),
Host::Ipv6(address) => address.is_loopback(),
});
if !is_loopback && authenticated {
bail!("remote cache URL must use HTTPS except for loopback development servers");
}View on GitHub (pinned to 533346cc37)