Skip to main content

sanitize_git_url

Function sanitize_git_url 

Source
pub fn sanitize_git_url(url: &str) -> String
Expand description

Scrub embedded credentials from a git URL before it lands in an error message or log. A URL like https://user:token@host/path becomes https://***@host/path; an SSH-style user@host:path becomes ***@host:path. Returns the input unchanged when no @ userinfo is present.