Skip to contentSkip to conversation

fetch2/git: Document that we won't support passwords in git urls

PATCH New Richard Purdie 1 participant 1 message Nov 2, 2020

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fetch2/git: Document that we won't support passwords in git urls

This keeps coming up, document why we don't do this and the alternatives.

---
 lib/bb/fetch2/git.py | 5 +++++
 1 file changed, 5 insertions(+)
lib/bb/fetch2/git.py +5 -0
index b97967b487..490d57fbbf 100644
@@ -595,6 +595,11 @@ class Git(FetchMethod):
         """
         Return the repository URL
         """
+        # Note that we do not support passwords directly in the git urls. There are several
+        # reasons. SRC_URI can be written out to things like buildhistory and people don't
+        # want to leak passwords like that. Its also all too easy to share metadata without 
+        # removing the password. ssh keys, ~/.netrc and ~/.ssh/config files can be used as
+        # alternatives so we will not take patches adding password support here.
         if ud.user:
             username = ud.user + '@'
         else:
Signature · 1 line
2.25.1