aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--kolla/image/tasks.py1
-rw-r--r--releasenotes/notes/bug-2098904-4c5670049a7e1a66.yaml5
2 files changed, 6 insertions, 0 deletions
diff --git a/kolla/image/tasks.py b/kolla/image/tasks.py
index a36ba5cea..28af3d52d 100644
--- a/kolla/image/tasks.py
+++ b/kolla/image/tasks.py
@@ -232,6 +232,7 @@ class BuildTask(EngineTask):
git.Git().clone(source['source'], clone_dir)
git.Git(clone_dir).checkout(source['reference'])
reference_sha = git.Git(clone_dir).rev_parse('HEAD')
+ git.Git(clone_dir).remote("remove", "origin")
self.logger.debug("Git checkout by reference %s (%s)",
source['reference'], reference_sha)
except Exception as e:
diff --git a/releasenotes/notes/bug-2098904-4c5670049a7e1a66.yaml b/releasenotes/notes/bug-2098904-4c5670049a7e1a66.yaml
new file mode 100644
index 000000000..7d8e3dafb
--- /dev/null
+++ b/releasenotes/notes/bug-2098904-4c5670049a7e1a66.yaml
@@ -0,0 +1,5 @@
+---
+fixes:
+ - |
+ Removes Git remote URLs after cloning to prevent credential exposure.
+ `LP#2098904 <https://bugs.launchpad.net/kolla/+bug/2098904>`__