我正在尝试在 Docker 容器内运行
bitbake
:
docker exec -i yocto /bin/bash -c "bitbake ${IMAGE} --runall=fetch"
我遇到错误:
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>')
退出代码6表示“用户名/密码验证失败”。所以我想我需要以某种方式将 Artifatory 凭证/API 密钥直接传递给
bitbake
或传递给 docker exec
有没有现有的方法可以做到这一点?
更新
我也尝试添加
SRC_URI += \"https://<ARTIFACTORY.COM>;protocol=https;user=${ARTIFACTORY_USER}:${ARTIFACTORY_PASSWD}\"
到conf/local.conf,但现在我明白了
Bitbake Fetcher Error: NoChecksumError('Missing SRC_URI checksum', 'https://<ARTIFACTORY.COM>')
通过在主目录中创建带有凭据的
.netrc
文件来修复:
docker exec -i yocto /bin/bash -c """echo 'machine https://<ARTIFACTORY.COM>' > ~/.netrc &&
echo 'login ${ARTIFACTORY_USER}' >> ~/.netrc &&
echo 'password ${ARTIFACTORY_PASSWD}' >> ~/.netrc
"""