[1.52,5/5] fetch2: ssh: username and password are optional

Message ID e573d5d3baebcbc4e950da3796ce55d5e920c0fd.1647223687.git.anuj.mittal@intel.com
State Accepted, archived
Commit 1bc9f800ffc9b740cc1de0132ed04f07eadb3479
Headers show
Series [1.52,1/5] contrib: Fix hash server Dockerfile dependencies | expand

Commit Message

Mittal, Anuj March 14, 2022, 2:13 a.m. UTC
From: Daniel Wagenknecht <dwagenknecht@emlix.com>

Support URLs like ssh://HOST/PATH. They were previously not recognized
due to a missing @ sign.

Signed-off-by: Daniel Wagenknecht <dwagenknecht@emlix.com>
Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
(cherry picked from commit a2aa18bd27dac8902e52b466cb7118f71367d3dc)
Signed-off-by: Anuj Mittal <anuj.mittal@intel.com>
---
 lib/bb/fetch2/ssh.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Patch

diff --git a/lib/bb/fetch2/ssh.py b/lib/bb/fetch2/ssh.py
index 2c8557e1..a104c9eb 100644
--- a/lib/bb/fetch2/ssh.py
+++ b/lib/bb/fetch2/ssh.py
@@ -40,9 +40,9 @@  __pattern__ = re.compile(r'''
  (                   # Optional username/password block
   (?P<user>\S+)      # username
   (:(?P<pass>\S+))?  # colon followed by the password (optional)
- )?
  (?P<cparam>(;[^;]+)*)?  # connection parameters block (optional)
  @
+ )?
  (?P<host>\S+?)          # non-greedy match of the host
  (:(?P<port>[0-9]+))?    # colon followed by the port (optional)
  /