From: "Samuel Jiang (江騏先)" <Samuel.Jiang@quantatw.com>
To: Richard Purdie <richard.purdie@linuxfoundation.org>,
"yocto@yoctoproject.org" <yocto@yoctoproject.org>
Cc: Alex Chong <v-chucho@microsoft.com>
Subject: Re: bitbake SRC_URI fetch Azure DevOps repository Azure DevOps Services Basic
Date: Wed, 20 Nov 2019 08:23:43 +0000 [thread overview]
Message-ID: <302f00923ac947bc9e2652af171ba6ff@quantatw.com> (raw)
In-Reply-To: <fddb0eb4c0392f0ae427f458cc9684b02444e403.camel@linuxfoundation.org>
Hi Richard,
Thanks for your patch which could work for us.
I study git-clone document and found the git urls support alternative scp-like syntax like below:
[user@]host.xz:path/to/repo.git/
It seems like Azure DevOps provides SSH url.
Will yocto support this alternative url?
Thanks,
Samuel Jiang
-----Original Message-----
From: Richard Purdie <richard.purdie@linuxfoundation.org>
Sent: Thursday, November 14, 2019 2:52 AM
To: Samuel Jiang (江騏先) <Samuel.Jiang@quantatw.com>; yocto@yoctoproject.org
Cc: Alex Chong <v-chucho@microsoft.com>
Subject: Re: [yocto] bitbake SRC_URI fetch Azure DevOps repository Azure DevOps Services Basic
On Wed, 2019-11-13 at 09:02 +0000, Samuel Jiang (江騏先) wrote:
> I got below error message:
> crashdump-git-r0 do_fetch: Fetcher failure: Fetch command export
> PSEUDO_DISABLED=1; unset _PYTHON_SYSCONFIGDATA_NAME; export DBUS_SESSION_BUS_ADDRESS="unix:path=/run/user/1000/bus"; export SSH_AGENT_PID="2255"; export SSH_AUTH_SOCK="/run/user/1000/keyring/ssh"; export PATH="[private_data]"; export HOME="/home/samueljiang"; git -c core.fsyncobjectfiles=0 ls-remote git://quanta01.visualstudio.com/OpenBMC/_git/crashdump failed with exit code 128, output:
> fatal: unable to connect to quanta01.visualstudio.com:
> quanta01.visualstudio.com[0: 2620:1ec:21::18]: errno=Network is
> unreachable
> quanta01.visualstudio.com[1: 13.107.42.18]: errno=Connection timed out
>
> Seems this url with git:// prefix could not connect in Azure DevOps
>
> Document[https://docs.microsoft.com/en-us/azure/devops/repos/git/use-ssh-keys-to-authenticate?view=azure-devops].
I now realise what the problem is. Whatever this git server you're talking to is, it does not work the same as is documented for the "git clone" manpage.
There is no option to force bitbake to use the syntax you're asking for since the manpage says the synax its using is valid. You could patch bitbake to force it to use that syntax with a patch like:
diff --git a/bitbake/lib/bb/fetch2/git.py b/bitbake/lib/bb/fetch2/git.py index fa41b078f12..f20c1f36b82 100644
--- a/bitbake/lib/bb/fetch2/git.py
+++ b/bitbake/lib/bb/fetch2/git.py
@@ -588,6 +588,8 @@ class Git(FetchMethod):
username = ud.user + '@'
else:
username = ""
+ if ud.proto == "ssh":
+ return "%s%s:%s" % (username, ud.host, ud.path[1:])
return "%s://%s%s%s" % (ud.proto, username, ud.host, ud.path)
def _revision_key(self, ud, d, name):
which in my local tests appeared to give the result you're asking for but that shouldn't be required with a server that adheres to what the git manual says is supported.
Cheers,
Richard
prev parent reply other threads:[~2019-11-20 8:23 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <489934f9-1420-40b0-a74a-54b71633bbed@SINGMEHUB07.gme.gbl>
[not found] ` <KL1P15301MB03443E265CCD3E6492C091CF80630@KL1P15301MB0344.APCP153.PROD.OUTLOOK.COM>
[not found] ` <a1ef7037a6a94e518fcef16502c67585@quantatw.com>
[not found] ` <SG2P153MB0349D0EFB059BC372C86528880630@SG2P153MB0349.APCP153.PROD.OUTLOOK.COM>
2019-11-04 2:52 ` bitbake SRC_URI fetch Azure DevOps repository Azure DevOps Services Basic Samuel Jiang (江騏先)
2019-11-05 14:22 ` Mark Hatle
2019-11-05 15:30 ` Richard Purdie
2019-11-13 3:06 ` Samuel Jiang (江騏先)
2019-11-13 8:10 ` Richard Purdie
2019-11-13 9:02 ` Samuel Jiang (江騏先)
2019-11-13 18:52 ` Richard Purdie
2019-11-20 8:23 ` Samuel Jiang (江騏先) [this message]
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=302f00923ac947bc9e2652af171ba6ff@quantatw.com \
--to=samuel.jiang@quantatw.com \
--cc=richard.purdie@linuxfoundation.org \
--cc=v-chucho@microsoft.com \
--cc=yocto@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox