My use-case is an invalid SSL certificate. Pulling from the wiki with a
recent version of libwww-perl fails, and git-remote-mediawiki gave no
clue about the reason. Give the mediawiki API detailed error message, and
since it is not so informative, hint the user about an invalid SSL
certificate on https:// urls.

Signed-off-by: Matthieu Moy <>
 contrib/mw-to-git/git-remote-mediawiki.perl | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/contrib/mw-to-git/git-remote-mediawiki.perl 
index 9c14c1f..5b6e833 100755
--- a/contrib/mw-to-git/git-remote-mediawiki.perl
+++ b/contrib/mw-to-git/git-remote-mediawiki.perl
@@ -292,7 +292,13 @@ sub get_mw_all_pages {
        if (!defined($mw_pages)) {
                print STDERR "fatal: could not get the list of wiki pages.\n";
                print STDERR "fatal: '$url' does not appear to be a 
-               print STDERR "fatal: make sure '$url/api.php' is a valid 
+               if ($url =~ /^https/) {
+                   print STDERR "fatal: make sure '$url/api.php' is a valid 
+                   print STDERR "fatal: and the SSL certificate is correct.\n";
+               } else {
+                   print STDERR "fatal: make sure '$url/api.php' is a valid 
+               }
+               print STDERR "error: " . $mediawiki->{error}->{details} . "\n";
                exit 1;
        foreach my $page (@{$mw_pages}) {

To unsubscribe from this list: send the line "unsubscribe git" in
the body of a message to
More majordomo info at

Reply via email to