chiark / gitweb /
git-svn: check HTTPS connection with Python Requests
[fdroidserver.git] / fdroidserver / common.py
index 938b1c158b8dbc1b6ebefc076f682e9fb283f267..87a9d27904023724f4dca37137b3799d4cf61dd7 100644 (file)
@@ -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: