From ef87c93e44dc449f502e53b8a8260748d17b7765 Mon Sep 17 00:00:00 2001 From: Owen W. Taylor Date: Jan 22 2020 16:42:10 +0000 Subject: Version 0.6 --- diff --git a/Makefile b/Makefile index 4d44f90..1406f60 100644 --- a/Makefile +++ b/Makefile @@ -1,11 +1,11 @@ all: reset-data: - docker-compose down || true - docker volume rm regindexer_registry || true + podman-compose down || true + podman volume rm regindexer_registry || true trust-local: - docker-compose exec frontend cat /etc/pki/tls/certs/regindexer_ca.crt > regindexer.crt + podman exec regindexer_frontend_1 cat /etc/pki/tls/certs/regindexer_ca.crt > regindexer.crt sudo sh -c 'cp regindexer.crt /etc/pki/ca-trust/source/anchors/ && update-ca-trust' sudo sh -c 'grep -l registry.local.fishsoup.net /etc/hosts > /dev/null || echo "127.0.0.1 registry.local.fishsoup.net" >> /etc/hosts' rm -f regindexer.crt @@ -15,7 +15,7 @@ untrust-local: sudo sh -c 'sed -i /registry.local.fishsoup.net/d /etc/hosts' trigger-reindex: - docker-compose exec index trigger-reindex.sh + podman exec regindexer_index_1 trigger-reindex.sh README.html: README.md codehilite.css Makefile ( echo '' && \ diff --git a/services/frontend/registry_copy.py b/services/frontend/registry_copy.py index abbf0c8..77f6ab5 100755 --- a/services/frontend/registry_copy.py +++ b/services/frontend/registry_copy.py @@ -142,9 +142,11 @@ class RegistrySession(object): self.insecure = insecure self.auth = None + self.orig_auth = None if creds is not None: username, password = creds.split(':', 1) self.auth = requests.auth.HTTPBasicAuth(username, password) + self.orig_auth = self.auth self._fallback = None if re.match('http(s)?://', self.registry): @@ -172,6 +174,8 @@ class RegistrySession(object): if not service and scope and realm: return False + self.auth = self.orig_auth + url = realm + '?' + urlencode([('service', service), ('scope', scope)]) res = requests.get(url, auth=self.auth) if res.status_code != 200: diff --git a/setup.py b/setup.py index e501747..6b13047 100644 --- a/setup.py +++ b/setup.py @@ -1,7 +1,7 @@ from setuptools import setup setup(name='regindexer', - version='0.5', + version='0.6', description='Tool for creating an index of a container registry', url='https://pagure.io/regindexer', author='Owen Taylor',