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

* Re: [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling
  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 20:16 ` Khem Raj
  1 sibling, 1 reply; 6+ messages in thread
From: Joshua Watt @ 2021-01-14 16:14 UTC (permalink / raw)
  To: openembedded-core; +Cc: Dominik Schmidt

Argh, sorry. This is not what we want.... I was supposed to make a 
different change and forgot :(

On 1/14/21 10:11 AM, Joshua Watt wrote:
> 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)

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

* Re: [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling
  2021-01-14 16:14 ` Joshua Watt
@ 2021-01-14 16:52   ` Quentin Schulz
  2021-01-14 16:55     ` Joshua Watt
  0 siblings, 1 reply; 6+ messages in thread
From: Quentin Schulz @ 2021-01-14 16:52 UTC (permalink / raw)
  To: Joshua Watt; +Cc: openembedded-core, Dominik Schmidt

Hi Joshua,

On Thu, Jan 14, 2021 at 10:14:57AM -0600, Joshua Watt wrote:
> Argh, sorry. This is not what we want.... I was supposed to make a different
> change and forgot :(
> 
> On 1/14/21 10:11 AM, Joshua Watt wrote:
> > 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]
> > 

Don't forget Dominik's SoB too!

Quentin

> > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>

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

* Re: [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling
  2021-01-14 16:52   ` Quentin Schulz
@ 2021-01-14 16:55     ` Joshua Watt
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Watt @ 2021-01-14 16:55 UTC (permalink / raw)
  To: Quentin Schulz; +Cc: OE-core, Dominik Schmidt

On Thu, Jan 14, 2021 at 10:52 AM Quentin Schulz
<quentin.schulz@streamunlimited.com> wrote:
>
> Hi Joshua,
>
> On Thu, Jan 14, 2021 at 10:14:57AM -0600, Joshua Watt wrote:
> > Argh, sorry. This is not what we want.... I was supposed to make a different
> > change and forgot :(
> >
> > On 1/14/21 10:11 AM, Joshua Watt wrote:
> > > 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]
> > >
>
> Don't forget Dominik's SoB too!

Ya.... I noticed he didn't provide one on his patch after I sent it...
anyway it doesn't matter because we aren't taking this patch and it
should be ignored

>
> Quentin
>
> > > Signed-off-by: Joshua Watt <JPEWhacker@gmail.com>

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

* Re: [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling
  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 20:16 ` Khem Raj
  2021-01-14 20:18   ` Joshua Watt
  1 sibling, 1 reply; 6+ messages in thread
From: Khem Raj @ 2021-01-14 20:16 UTC (permalink / raw)
  To: Joshua Watt, openembedded-core; +Cc: Dominik Schmidt



On 1/14/21 8:11 AM, Joshua Watt wrote:
> 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.
> 

will this appear in package metadata in rpms/ipks etc ?

> [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)
> 
> 
> 
> 
> 

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

* Re: [OE-core][PATCH] fetch2: git: Append the password to the username on git URI reassembling
  2021-01-14 20:16 ` Khem Raj
@ 2021-01-14 20:18   ` Joshua Watt
  0 siblings, 0 replies; 6+ messages in thread
From: Joshua Watt @ 2021-01-14 20:18 UTC (permalink / raw)
  To: Khem Raj, openembedded-core; +Cc: Dominik Schmidt


On 1/14/21 2:16 PM, Khem Raj wrote:
>
>
> On 1/14/21 8:11 AM, Joshua Watt wrote:
>> 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.
>>
>
> will this appear in package metadata in rpms/ipks etc ?


Possibly. There are a lot of problems with it, so we aren't accepting 
this patch. I sent it in error :)


>
>> [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)
>>
>>
>>
>> 
>>

^ permalink raw reply	[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.