From 68fd4929f4dc7619d7483fe76690162ae39a2ca7 Mon Sep 17 00:00:00 2001 From: Sven Oliver Moll Date: Fri, 22 Sep 2017 15:35:44 +0200 Subject: [PATCH] lib/bb/fetch2/git.py: added handling of password Trying to checkout sourcecode which is username/password protected fails. This is a fix that also hands down the password to the downloader. --- lib/bb/fetch2/git.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/bb/fetch2/git.py b/lib/bb/fetch2/git.py index 5ef8cd69e2..82e2ff0de4 100644 --- a/lib/bb/fetch2/git.py +++ b/lib/bb/fetch2/git.py @@ -523,7 +523,10 @@ def _get_repo_url(self, ud): Return the repository URL """ if ud.user: - username = ud.user + '@' + if us.pswd: + username = ud.user + ':' + us.pswd + '@' + else: + username = ud.user + '@' else: username = "" return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)