nikivdev/code · error
Invalid GitHub HTTPS URL: {}
Error message
Invalid GitHub HTTPS URL: {} What it means
Error "Invalid GitHub HTTPS URL: {}" thrown in nikivdev/code.
Source
Thrown at src/publish.rs:40
bail!("GitHub URL is empty");
}
if let Some(rest) = trimmed.strip_prefix("git@github.com:") {
let rest = rest.trim_end_matches(".git");
let Some((owner, repo)) = rest.split_once('/') else {
bail!("Invalid GitHub SSH URL: {}", url);
};
return Ok((
owner.to_string(),
repo.to_string(),
format!("git@github.com:{}/{}.git", owner, repo),
));
}
if let Some(rest) = trimmed.strip_prefix("https://github.com/") {
let rest = rest.trim_end_matches(".git");
let Some((owner, repo)) = rest.split_once('/') else {
bail!("Invalid GitHub HTTPS URL: {}", url);
};
return Ok((
owner.to_string(),
repo.to_string(),
format!("git@github.com:{}/{}.git", owner, repo),
));
}
bail!(
"Unsupported GitHub URL (expected https://github.com/... or git@github.com:...): {}",
url
);
}
/// Run the publish command.
pub fn run(cmd: PublishCommand) -> Result<()> {
match cmd.action {
Some(PublishAction::Gitedit(opts)) => run_gitedit(opts),View on GitHub (pinned to a747e741ae)
When it happens
Trigger: Thrown at src/publish.rs:40 when the library encounters an invalid state.
Common situations: See trigger scenarios.
AI-assisted analysis of nikivdev/code@a747e741ae (2026-09-01).
Data as JSON: /api/errors/02e56500a586fb60.
Report an issue: GitHub.