Skip to main content

normalize_github_url

Function normalize_github_url 

Source
pub fn normalize_github_url(u: &str) -> String
Expand description

Turns any GitHub remote form — git@github.com:o/r.git, ssh://git@github.com[:22]/o/r, git://github.com/o/r, https://token@GitHub.com/o/r.git, github.com/o/r — into https://github.com/o/r. Credentials are never kept. Other URLs with a scheme lose their credentials and trailing “.git”; scp-style remotes on other hosts are returned unchanged.