gpt4 book ai didi

git - 在 Yocto 中,如何通过非标准端口上的 ssh 读取 git 存储库

转载 作者:行者123 更新时间:2023-12-04 11:46:06 32 4
gpt4 key购买 nike

我创建了一个包含这些定义的配方:

SRC_URI = "git://git:<password>@<ip address>:<ssh_port>/home/git/tuxin-repo/project.git;protocol=ssh;branch=test"
SRCREV_default = "5a0b8545d39c97bd9f9628143ed174dabb71f641"

bitbake 以错误结束

ERROR: Fetcher failure: Fetch command failed with exit code 128, output: Cloning into bare repository '/home/yocto/build/downloads/git2/..home.git.tuxin-repo.project.git'... Permission denied, please try again. Permission denied, please try again. Permission denied (publickey,password). fatal: Could not read from remote repository.

Please make sure you have the correct access rights and the repository exists.

ERROR: Function failed: Fetcher failure for URL: 'git://git:@:/home/git/tuxin-repo/project.git;protocol=ssh;branch='test''. Unable to fetch URL from any source. ERROR: Logfile of failure stored in: /home/yocto/build/tmp/work/cortexa8hf-vfp-neon-poky-linux-gnueabi/capsystem/1.0-r0/temp/log.do_fetch.7045 ERROR: Task 4 (/home/yocto/sources/poky/../meta-tuxin/recipes-support/project/project.bb, do_fetch) failed with exit code '1'



在命令行中,输入密码后,项目被加载。
git clone --branch test ssh://git@<ip_address>:<ssh_port>/home/git/tuxin-repo/project.git

有人可以向我解释我的错误吗?

最佳答案

您必须以这种方式指定 SRC_URI:

SRC_URI = "git://git@<ip address>:<ssh_port>/home/git/tuxin-repo/project.git;protocol=ssh;branch=test"
注意 的使用git@ 在 IP 地址之前。您不能在 SRC_URI 中指定密码作为安全措施。对于自动身份验证,您必须使用其他方法作为 .ssh/config

关于git - 在 Yocto 中,如何通过非标准端口上的 ssh 读取 git 存储库,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54823823/

32 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com