Thank you all, your answers were so helpful,
My problem had been solved.
The reason behind my question was a temporary connections error for some
machines in the lab so I needed some way to cover this problem  as fast as
possible to keep my Yocto recipes away from this problem.

Thank you very much.

On Mon, May 11, 2020 at 8:37 PM Mark Hatle <mark.ha...@kernel.crashing.org>
wrote:

>
>
> On 5/11/20 4:17 AM, Quentin Schulz wrote:
> > Hi Mohamed,
> >
> > On Mon, May 11, 2020 at 11:03:26AM +0200, Dawod wrote:
> >> Hello,
> >>
> >> I need to fetch a git repo using 2 different protocols ( ssh & https )
> >> So that when I run bitbake, It will fetch using ssh protocol first and
> if
> >> it fails to fetch, It will try to fetch using https protocol.
> >>
> >
> > Why? What's the exact use case?
> >
> >> can I do some thing like that or I will have to change it manually every
> >> time ?
> >>
> >
> > Maybe you could play with PREMIRROS? (I've never explicitly used that
> > variable though):
> >
> https://www.yoctoproject.org/docs/latest/mega-manual/mega-manual.html#var-PREMIRRORS
>
> This is what I would suggest.  Have the recipe itself set the fallback URI
> as
> the main URL.
>
>
> SRC_URI = "git://example.com/my/repository/uri;proto=https"
>
> PREMIRRORS_prepend = "git://example.com/my/repository/uri;proto=https
> git://example.com/my/otherrepo/uri;proto=ssh \n"
>
> (the \n is literally '\' and 'n')
>
> The above should, when it sees the SRC_URI, try the ssh protocol first..
> if that
> doesn't work it will fall back to SRC_URI.
>
> --Mark
>
> > I guess the asterisk parts could be removed and the path to more or less
> your
> > source could be used (ssh first, to http path in your SRC_URI)?
> >
> > That's a shot in the dark for me but something to test I'd say :)
> >
> > Quentin
> >
> >
> > 
> >
>


-- 

Mohamed Dawod
Computer Engineer
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.

View/Reply Online (#138157): 
https://lists.openembedded.org/g/openembedded-core/message/138157
Mute This Topic: https://lists.openembedded.org/mt/74131887/21656
Group Owner: openembedded-core+ow...@lists.openembedded.org
Unsubscribe: https://lists.openembedded.org/g/openembedded-core/unsub  
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to