diff --git a/doozerlib/cli/__init__.py b/doozerlib/cli/__init__.py index 6274acb3e..dcee86e33 100644 --- a/doozerlib/cli/__init__.py +++ b/doozerlib/cli/__init__.py @@ -73,6 +73,7 @@ def print_version(ctx, param, value): help='If a base image is not included, lookup latest FROM tag for parent. Implies --ignore-missing-base') @click.option("--quiet", "-q", default=False, is_flag=True, help="Suppress non-critical output") @click.option('--debug', default=False, is_flag=True, help='Show debug output on console.') +@click.option('--disable-gssapi', default=False, is_flag=True, help='Disable gssapi for requests that do not require keytab') @click.option("--stream", metavar="STREAM_NAME PULLSPEC", nargs=2, multiple=True, help="Override a stream.yml entry with a specific pullspec. [multiple]") @click.option("--lock-upstream", "upstreams", metavar="DISTGIT_KEY COMMIT-ISH", multiple=True, nargs=2, diff --git a/doozerlib/runtime.py b/doozerlib/runtime.py index e59fbcb05..5bf02ebbd 100644 --- a/doozerlib/runtime.py +++ b/doozerlib/runtime.py @@ -153,6 +153,7 @@ def __init__(self, **kwargs): self.releases_config = None self.assembly = 'test' self._build_status_detector = None + self.disable_gssapi = False self.stream: List[str] = [] # Click option. A list of image stream overrides from the command line. self.stream_overrides: Dict[str, str] = {} # Dict of stream name -> pullspec from command line. @@ -739,7 +740,8 @@ def shared_koji_client_session(self): with self.koji_lock: if self._koji_client_session is None: self._koji_client_session = self.build_retrying_koji_client() - self._koji_client_session.gssapi_login() + if not self.disable_gssapi: + self._koji_client_session.gssapi_login() yield self._koji_client_session @contextmanager