All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sourabh Hegde <hrsourabh011@gmail.com>
To: Nicolas Jeker <n.jeker@delisys.ch>
Cc: yocto@lists.yoctoproject.org
Subject: Re: [yocto] Fetch private gitlab repo using ssh with Yocto recipe #bitbake
Date: Fri, 28 Jan 2022 10:46:50 +0100	[thread overview]
Message-ID: <CADYjeSsxC=LzFMLGTZy1u4m_MfNsHJ3Nq3Y+zYwY_toJYZFhMg@mail.gmail.com> (raw)
In-Reply-To: <664d7ef6f28584b0d7310774ad48660437562589.camel@delisys.ch>

[-- Attachment #1: Type: text/plain, Size: 1687 bytes --]

Hi Nicolas,

Thanks for your answer.

That's great. Even I am building inside a docker container. I tried with
creating a "config" file in .ssh directory. But I still have same issue.

Can you please let me know how to "forward SSH_AGENT into it to be able
to fetch from internal projects without the need to mount the key into the
container."? I never did that before.

Thanks in advance.

On Fri, Jan 28, 2022, 10:42 Nicolas Jeker <n.jeker@delisys.ch> wrote:

> On Tue, 2022-01-25 at 23:16 -0800, hrsourabh011@gmail.com wrote:
> > I am trying to fetch a private gitlab repo within Yocto image recipe
> > using SSH protocol. In my image recipe I have passed SRC_URI as:
> >
> > SRC_URI = " \
> >         gitsm://git@git.example.com:2224/blah/blah/blah/blah;protocol
> > =ssh;branch=master \
> > "
>
> I use almost the same, just without submodules.
>
> SRC_URI =
> "git://git@git.example.com:1234/group/project.git;protocol=ssh"
>
> It should "just work" if ssh is able to find your key. I often build in
> a docker container, so I have to forward SSH_AGENT into it to be able
> to fetch from internal projects without the need to mount the key into
> the container. I don't really have any insight for builds outside
> docker, if git clone works, the bitbake fetcher should too.
>
> > But this results in the error:
> >
> <snip>
> >
> > But I am able to clone the repo using git clone.
> > SSH key is already added to the Gitlab. There is no config file in my
> > ~/.ssh. Do I need to create a config file? What should be the content
> > of the config file?
>
> You should not need a ssh config file.
>
> > Can anyone please let me know how to resolve this?
> > Thanks in advance.
>
>

[-- Attachment #2: Type: text/html, Size: 2699 bytes --]

  parent reply	other threads:[~2022-01-28  9:47 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-01-26  7:16 Fetch private gitlab repo using ssh with Yocto recipe #bitbake hrsourabh011
     [not found] ` <664d7ef6f28584b0d7310774ad48660437562589.camel@delisys.ch>
2022-01-28  9:46   ` Sourabh Hegde [this message]
2022-01-28 10:27     ` AW: [yocto] " embedded (VIVAVIS AG)
     [not found]       ` <90997c2cb92ea9700451b0e5d9afaeef64f4662c.camel@delisys.ch>
2022-01-28 12:33         ` Erik Botö
2022-01-28 17:37       ` Khem Raj
2022-01-31 10:54         ` Sourabh Hegde

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CADYjeSsxC=LzFMLGTZy1u4m_MfNsHJ3Nq3Y+zYwY_toJYZFhMg@mail.gmail.com' \
    --to=hrsourabh011@gmail.com \
    --cc=n.jeker@delisys.ch \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.