From: Hans-Christoph Steiner Date: Mon, 5 Feb 2018 13:44:59 +0000 (+0100) Subject: git-svn: check HTTPS connection with Python Requests X-Git-Tag: 1.0.1~14^2 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~ianmdlvl/git?a=commitdiff_plain;h=dc26e7f79f28ba520465b8a2f199c209c7b77350;p=fdroidserver.git git-svn: check HTTPS connection with Python Requests git-svn will put up the "Reject/Accept" prompt if it encounters a bad HTTPS certificate. I could find no way to stop it from doing that. So instead, this checks the HTTPS connection with an HTTP HEAD request first. --- diff --git a/fdroidserver/common.py b/fdroidserver/common.py index 938b1c15..87a9d279 100644 --- a/fdroidserver/common.py +++ b/fdroidserver/common.py @@ -1007,6 +1007,11 @@ class vcs_gitsvn(vcs): if not remote.startswith('https://'): raise VCSException(_('HTTPS must be used with Subversion URLs!')) + # git-svn sucks at certificate validation, this throws useful errors: + import requests + r = requests.head(remote) + r.raise_for_status() + gitsvn_args.extend(['--', remote, self.local]) p = self.git(gitsvn_args) if p.returncode != 0: