All of lore.kernel.org
 help / color / mirror / Atom feed
* gitsm fetcher does not work anymore
@ 2018-10-02 16:24 Florian Wickert
  2018-10-02 16:58 ` Olof Johansson
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Florian Wickert @ 2018-10-02 16:24 UTC (permalink / raw)
  To: bitbake-devel

Hi all,

relative URL schemes (e.g. submodules in 
https://github.com/xiph/Icecast-libshout) or SSH URLs (e.g. 
git@github.com:user/example.git) are not parsed correctly since the 
rework done in 5cd00e3e53819f3c10d1733480077ce9f3cc2ca8.
The SSH scheme is required for private repos on github because https 
doesn't work with SSH keys.

Regards,
Florian

-- 
Florian Wickert, M.Sc.
Javox Solutions GmbH
Gallierstr. 33, 52074 Aachen
Germany

Phone: +49 241 99034569
Web:www.javox-solutions.com



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

* Re: gitsm fetcher does not work anymore
  2018-10-02 16:24 gitsm fetcher does not work anymore Florian Wickert
@ 2018-10-02 16:58 ` Olof Johansson
  2018-10-02 17:14 ` Mark Hatle
  2018-10-02 17:15 ` Mark Hatle
  2 siblings, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2018-10-02 16:58 UTC (permalink / raw)
  To: Florian Wickert; +Cc: bitbake-devel

On 18-10-02 18:24 +0200, Florian Wickert wrote:
> The SSH scheme is required for private repos on github because https doesn't
> work with SSH keys.

SSH keys have never worked for https. You have to authenticate in
other ways, like authentication tokens. But saying that private
repos *require* ssh transport is not true.

See for instance https://gist.github.com/technoweenie/1072829 for
how to use ~/.netrc to do this in non-interactive environments
like OE (or when you just can't stand having to enter your
password over and over).

-- 
olofjn


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

* Re: gitsm fetcher does not work anymore
  2018-10-02 16:24 gitsm fetcher does not work anymore Florian Wickert
  2018-10-02 16:58 ` Olof Johansson
@ 2018-10-02 17:14 ` Mark Hatle
  2018-10-02 17:34   ` Mark Hatle
  2018-10-02 18:12   ` Olof Johansson
  2018-10-02 17:15 ` Mark Hatle
  2 siblings, 2 replies; 7+ messages in thread
From: Mark Hatle @ 2018-10-02 17:14 UTC (permalink / raw)
  To: Florian Wickert, bitbake-devel

On 10/2/18 11:24 AM, Florian Wickert wrote:
> Hi all,
> 
> relative URL schemes (e.g. submodules in 
> https://github.com/xiph/Icecast-libshout) or SSH URLs (e.g. 
> git@github.com:user/example.git) are not parsed correctly since the 

git@github.com:user/example.git that is not a valid URL.

ssh://git@github.com/user/example.git would be.

Is this an issue where it's specified inside of the git repository as a non-url
string?  If so, we'll have to learn how to recognize that and convert it
'somehow' to something that can be recognized as a URL.

(Does the git fetcher support ssh uris?)

--Mark

> rework done in 5cd00e3e53819f3c10d1733480077ce9f3cc2ca8.
> The SSH scheme is required for private repos on github because https 
> doesn't work with SSH keys.
> 
> Regards,
> Florian
> 



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

* Re: gitsm fetcher does not work anymore
  2018-10-02 16:24 gitsm fetcher does not work anymore Florian Wickert
  2018-10-02 16:58 ` Olof Johansson
  2018-10-02 17:14 ` Mark Hatle
@ 2018-10-02 17:15 ` Mark Hatle
  2018-10-02 18:08   ` Mark Hatle
  2 siblings, 1 reply; 7+ messages in thread
From: Mark Hatle @ 2018-10-02 17:15 UTC (permalink / raw)
  To: Florian Wickert, bitbake-devel

On 10/2/18 11:24 AM, Florian Wickert wrote:
> Hi all,
> 
> relative URL schemes (e.g. submodules in 
> https://github.com/xiph/Icecast-libshout) or SSH URLs (e.g. 

URIs in question are of the format:

[submodule "m4"]
	path = m4
	url = ../icecast-m4.git
[submodule "src/common"]
	path = src/common
	url = ../icecast-common.git

While I'm somewhat surprised this is valid, this should be something we can resolve.

(yes I intentionally replied to the two concerns with different emails, as I see
them as different problems.)

--Mark

> git@github.com:user/example.git) are not parsed correctly since the 
> rework done in 5cd00e3e53819f3c10d1733480077ce9f3cc2ca8.
> The SSH scheme is required for private repos on github because https 
> doesn't work with SSH keys.
> 
> Regards,
> Florian
> 



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

* Re: gitsm fetcher does not work anymore
  2018-10-02 17:14 ` Mark Hatle
@ 2018-10-02 17:34   ` Mark Hatle
  2018-10-02 18:12   ` Olof Johansson
  1 sibling, 0 replies; 7+ messages in thread
From: Mark Hatle @ 2018-10-02 17:34 UTC (permalink / raw)
  To: Florian Wickert, bitbake-devel

On 10/2/18 12:14 PM, Mark Hatle wrote:
> On 10/2/18 11:24 AM, Florian Wickert wrote:
>> Hi all,
>>
>> relative URL schemes (e.g. submodules in 
>> https://github.com/xiph/Icecast-libshout) or SSH URLs (e.g. 
>> git@github.com:user/example.git) are not parsed correctly since the 
> 
> git@github.com:user/example.git that is not a valid URL.
> 
> ssh://git@github.com/user/example.git would be.
> 
> Is this an issue where it's specified inside of the git repository as a non-url
> string?  If so, we'll have to learn how to recognize that and convert it
> 'somehow' to something that can be recognized as a URL.
> 
> (Does the git fetcher support ssh uris?)

FYI, the code that makes this work (for URIs) is:

http://git.openembedded.org/bitbake/tree/lib/bb/fetch2/gitsm.py

Lines 76+

            # Build new SRC_URI
            proto = uris[module].split(':', 1)[0]
            url = uris[module].replace('%s:' % proto, 'gitsm:', 1)
            url += ';protocol=%s' % proto

It splits at the :, since a proper URL should be <proto>://<path>  The it makes
the new URL into gitsm://<path>;protocol=<proto>

If if supporting the non-URI format of an SSH git is needed, then something will
need to be specifically added to this section to recognize and convert the URL
to a URL formatted configuration.

--Mark

> --Mark
> 
>> rework done in 5cd00e3e53819f3c10d1733480077ce9f3cc2ca8.
>> The SSH scheme is required for private repos on github because https 
>> doesn't work with SSH keys.
>>
>> Regards,
>> Florian
>>
> 



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

* Re: gitsm fetcher does not work anymore
  2018-10-02 17:15 ` Mark Hatle
@ 2018-10-02 18:08   ` Mark Hatle
  0 siblings, 0 replies; 7+ messages in thread
From: Mark Hatle @ 2018-10-02 18:08 UTC (permalink / raw)
  To: Florian Wickert, bitbake-devel

On 10/2/18 12:15 PM, Mark Hatle wrote:
> On 10/2/18 11:24 AM, Florian Wickert wrote:
>> Hi all,
>>
>> relative URL schemes (e.g. submodules in 
>> https://github.com/xiph/Icecast-libshout) or SSH URLs (e.g. 
> 
> URIs in question are of the format:
> 
> [submodule "m4"]
> 	path = m4
> 	url = ../icecast-m4.git
> [submodule "src/common"]
> 	path = src/common
> 	url = ../icecast-common.git
> 
> While I'm somewhat surprised this is valid, this should be something we can resolve.
> 
> (yes I intentionally replied to the two concerns with different emails, as I see
> them as different problems.)

Ok, I have a possible fix:

git://git.openembedded.org/bitbake-contrib mgh/gitsm

http://git.openembedded.org/bitbake-contrib/commit/?h=mgh/gitsm&id=f450ac0051f56683d43425d00e349c23ce6a16e4

Please try that and let me know if it resolves your issue.

--Mark

> --Mark
> 
>> git@github.com:user/example.git) are not parsed correctly since the 
>> rework done in 5cd00e3e53819f3c10d1733480077ce9f3cc2ca8.
>> The SSH scheme is required for private repos on github because https 
>> doesn't work with SSH keys.
>>
>> Regards,
>> Florian
>>
> 



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

* Re: gitsm fetcher does not work anymore
  2018-10-02 17:14 ` Mark Hatle
  2018-10-02 17:34   ` Mark Hatle
@ 2018-10-02 18:12   ` Olof Johansson
  1 sibling, 0 replies; 7+ messages in thread
From: Olof Johansson @ 2018-10-02 18:12 UTC (permalink / raw)
  To: Mark Hatle; +Cc: bitbake-devel

On 18-10-02 12:14 -0500, Mark Hatle wrote:
> (Does the git fetcher support ssh uris?)

Well, not an ssh:// uri, but

  git://example.com/repo.git;protocol=ssh

-- 
olofjn


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

end of thread, other threads:[~2018-10-02 18:12 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2018-10-02 16:24 gitsm fetcher does not work anymore Florian Wickert
2018-10-02 16:58 ` Olof Johansson
2018-10-02 17:14 ` Mark Hatle
2018-10-02 17:34   ` Mark Hatle
2018-10-02 18:12   ` Olof Johansson
2018-10-02 17:15 ` Mark Hatle
2018-10-02 18:08   ` Mark Hatle

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.