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 
> 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:]: 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 + '@'
             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.



yocto mailing list

Reply via email to