Mientras usaba bitbake después de la configuration, bitbake falló antes de intentar clonar / acceder a un repository privado usando un enlace SSH.
$ bitbake linux-imx git -c core.fsyncobjectfiles=0 ls-remote ssh://git@gitlab.com:~/some-project/some-repo.git | DEBUG: Python function base_do_fetch finished | DEBUG: Python function do_fetch finished | ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output: | ssh: Could not resolve hostname gitlab.com:~: Name or service not known | fatal: Could not read from remote repository. | | Please make sure you have the correct access rights | and the repository exists. | ERROR: Task 4 (/home/user/Projects/some_project/some-project-release-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_4.1.15.bb, do_fetch) failed with exit code '1'
Cuando bash eliminar el ~/
de la URL obtengo un error similar.
| DEBUG: Python function base_do_fetch finished | DEBUG: Python function do_fetch finished | ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output: | ssh: Could not resolve hostname gitlab.com:some-project: Name or service not known | fatal: Could not read from remote repository.
Incluso traté de modificar la URL a https:, en la que me dio otro error
git -c core.fsyncobjectfiles=0 ls-remote http://gitlab.com/some-project/some-repo.git | DEBUG: Python function base_do_fetch finished | DEBUG: Python function do_fetch finished | ERROR: Function failed: Fetcher failure: Fetch command failed with exit code 128, output: | fatal: could not read Username for 'https://gitlab.com': No such device or address | ERROR: Task 4 (/home/user/Projects/some-project/some-project-release-bsp/sources/meta-fsl-bsp-release/imx/meta-bsp/recipes-kernel/linux/linux-imx_4.1.15.bb, do_fetch) failed with exit code '1'
Cuando intenté lo mismo en el terminal en lugar de bitbake, tuvo éxito con la salida deseada
git -c core.fsyncobjectfiles=0 ls-remote git@gitlab.com:some-project/some-repo.git
Estoy usando Ubuntu 16.04. Sé que la construcción de Yocto no se testing en Ubuntu 16.04.
WARNING: Host distribution "Ubuntu-16.04" has not been validated with this version of the build system; you may possibly experience unexpected failures. It is recommended that you use a tested distribution.
Pero una construcción previa con repositorys públicos tuvo éxito. Entonces, ¿hay alguna manera de hacer que esto funcione?
Intenta usar:
git://git@gitlab.com/some-project/some-repo.git;protocol=ssh;branch=${SRCBRANCH}
en tu SRC_URI.
Tenga en count la eliminación de :~
.
Es algo que tiene que ver con la forma en que Yocto busca el código fuente de gitlab
. No importa que el repository sea público o privado, el enlace de git no funcionará.
He buscado mucho pero no encuentro un motivo. Entonces, tuve que mover mi repository a github. Funcionará cuando cambie a Github.
Una forma alternativa es search su fuente en local y editar la receta para que la fuente proceda de allí.