mirror of
https://github.com/f-droid/fdroidserver.git
synced 2025-09-15 23:42:37 +03:00
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.
This commit is contained in:
parent
a1075f45cc
commit
dc26e7f79f
1 changed files with 5 additions and 0 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue