All of lore.kernel.org
 help / color / mirror / Atom feed
* [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling
@ 2021-01-14 16:11 Joshua Watt
  2021-01-14 16:14 ` Joshua Watt
  2021-01-14 20:16 ` Khem Raj
  0 siblings, 2 replies; 6+ messages in thread
From: Joshua Watt @ 2021-01-14 16:11 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dominik Schmidt, Joshua Watt

From: Dominik Schmidt <ds@technokrat.ch>

This allows the users to specify SRC_URIs of the form
git://user:password@host.tld/path/to/repo.git

which allows pulling in private repositories.

[YOCTO #14065]

Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>
---
 bitbake/lib/bb/fetch2/git.py | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py
index df9538a60d..a1356ed9f0 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -606,7 +606,10 @@ class Git(FetchMethod):
         # 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 + '@'
+            username = ud.user
+            if ud.pswd:
+                username += ":" + ud.pswd
+            username += "@"
         else:
             username = ""
         return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
-- 
2.30.0


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2021-01-14 20:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2021-01-14 16:11 [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling Joshua Watt
2021-01-14 16:14 ` Joshua Watt
2021-01-14 16:52   ` Quentin Schulz
2021-01-14 16:55     ` Joshua Watt
2021-01-14 20:16 ` Khem Raj
2021-01-14 20:18   ` Joshua Watt

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.