I’m trying to run bitbake
inside a Docker container:
docker exec -i yocto /bin/bash -c "bitbake ${IMAGE} --runall=fetch"
I got error:
ERROR: <RESOURCE-vXXX> do_fetch: Fetcher failure: Fetch command export PSEUDO_DISABLED=1; export PATH="..."; export HOME="..."; /usr/bin/env wget -t 2 -T 30 --passive-ftp --no-check-certificate -O /path/to/archive.tar.gz.tmp -P /path/to/downloads 'https://<ARTIFACTORY.COM>/path/to/archive.tar.gz' --progress=dot -v failed with exit code 6, no output
ERROR: <RESOURCE-vXXX> do_fetch: Bitbake Fetcher Error: FetchError('Unable to fetch URL from any source.', 'https://<ARTIFACTORY.COM>/path/to/archive.tar.gz;unpack=1;name=vendor;subdir=/path/to/<RESOURCE>')
Exit code 6 means "Username/password authentication failure". So I guess I need somehow to pass Artifatory credentials/API-key either to bitbake
directly or to docker exec
Are there any existing approaches to do that?
Update
I also tried to add
SRC_URI += "https://<ARTIFACTORY.COM>;protocol=https;user=${ARTIFACTORY_USER}:${ARTIFACTORY_PASSWD}"
to conf/local.conf, but now I get
Bitbake Fetcher Error: NoChecksumError('Missing SRC_URI checksum', 'https://<ARTIFACTORY.COM>')
2
Answers
Fixed by creating
.netrc
file with credentials in Home directory:Instead of passing credentials, you can mount the host’s
.ssh
dir inside docker asvolume
while running docker e.gdocker run -it -v $HOME/.ssh:/home/<user>/.ssh <your_remaining-parameters>
Also to speed up the yocto build process you can mount
_git-repositories-cache
as well