Show More
@@ -118,6 +118,15 b' class GitRemote(object):' | |||
|
118 | 118 | repo = self._factory.repo(wire) |
|
119 | 119 | repo[ref] = commit_id |
|
120 | 120 | |
|
121 | def _remote_conf(self, config): | |
|
122 | params = [ | |
|
123 | '-c', 'core.askpass=""', | |
|
124 | ] | |
|
125 | ssl_cert_dir = config.get('vcs_ssl_dir') | |
|
126 | if ssl_cert_dir: | |
|
127 | params.extend(['-c', 'http.sslCAinfo={}'.format(ssl_cert_dir)]) | |
|
128 | return params | |
|
129 | ||
|
121 | 130 | @reraise_safe_exceptions |
|
122 | 131 | def add_object(self, wire, content): |
|
123 | 132 | repo = self._factory.repo(wire) |
@@ -456,11 +465,11 b' class GitRemote(object):' | |||
|
456 | 465 | repo = self._factory.repo(wire) |
|
457 | 466 | if refs and not isinstance(refs, (list, tuple)): |
|
458 | 467 | refs = [refs] |
|
459 | ||
|
468 | config = self._wire_to_config(wire) | |
|
460 | 469 | # get all remote refs we'll use to fetch later |
|
461 | 470 | output, __ = self.run_git_command( |
|
462 | 471 | wire, ['ls-remote', url], fail_on_stderr=False, |
|
463 | _copts=['-c', 'core.askpass=""'], | |
|
472 | _copts=self._remote_conf(config), | |
|
464 | 473 | extra_env={'GIT_TERMINAL_PROMPT': '0'}) |
|
465 | 474 | |
|
466 | 475 | remote_refs = collections.OrderedDict() |
@@ -491,7 +500,7 b' class GitRemote(object):' | |||
|
491 | 500 | _out, _err = self.run_git_command( |
|
492 | 501 | wire, ['fetch', url, '--force', '--prune', '--'] + fetch_refs, |
|
493 | 502 | fail_on_stderr=False, |
|
494 | _copts=['-c', 'core.askpass=""'], | |
|
503 | _copts=self._remote_conf(config), | |
|
495 | 504 | extra_env={'GIT_TERMINAL_PROMPT': '0'}) |
|
496 | 505 | |
|
497 | 506 | return remote_refs |
@@ -500,11 +509,11 b' class GitRemote(object):' | |||
|
500 | 509 | def sync_push(self, wire, url, refs=None): |
|
501 | 510 | if not self.check_url(url, wire): |
|
502 | 511 | return |
|
503 | ||
|
512 | config = self._wire_to_config(wire) | |
|
504 | 513 | repo = self._factory.repo(wire) |
|
505 | 514 | self.run_git_command( |
|
506 | 515 | wire, ['push', url, '--mirror'], fail_on_stderr=False, |
|
507 | _copts=['-c', 'core.askpass=""'], | |
|
516 | _copts=self._remote_conf(config), | |
|
508 | 517 | extra_env={'GIT_TERMINAL_PROMPT': '0'}) |
|
509 | 518 | |
|
510 | 519 | @reraise_safe_exceptions |
General Comments 0
You need to be logged in to leave comments.
Login now