From bee591a88057e8defcd1dc99beb5c0eb8a4cd211 Mon Sep 17 00:00:00 2001 From: "Kyle J. McKay" Date: Thu, 27 Oct 2016 00:00:50 -0700 Subject: [PATCH] mirrors: show "git@" ssh fetch URL Now that it's always possible to fetch over SSH using the anonymous, read-only "git" user, show the appropriate mirror URL to do so on mirror projects if ssh is enabled. Signed-off-by: Kyle J. McKay --- gitweb/gitweb_config.perl | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gitweb/gitweb_config.perl b/gitweb/gitweb_config.perl index 9c7606e..631d79e 100644 --- a/gitweb/gitweb_config.perl +++ b/gitweb/gitweb_config.perl @@ -150,6 +150,9 @@ $Girocco::Config::httppullurl and push @git_base_url_list, $Girocco::Config::htt ## list of extra git base URLs used for mirrors for where to fetch project from, ## i.e. full URL is "$git_base_mirror_url/$project" our @git_base_mirror_urls = (); +$Girocco::Config::pushurl && $Girocco::Config::pushurl =~ m|^ssh://|i and + push @git_base_mirror_urls, substr($Girocco::Config::pushurl, 0, 6) . + 'git@' . substr($Girocco::Config::pushurl, 6); ## list of git base URLs used for URL to push project to, ## i.e. full URL is "$git_base_push_url/$project" -- 2.11.4.GIT