gpt4 book ai didi

Chef Recipe 中的 Git checkout 不起作用

转载 作者:太空狗 更新时间:2023-10-29 12:58:13 25 4
gpt4 key购买 nike

我使用以下 chef 节来尝试检查 github 存储库:

   git "/home/ubuntu" do
repository "git://github.com/kmerenkov/brukva.git"
revision "master"
action :checkout
user "ubuntu"
end

Chef 运行没有错误,资源显示为最新(即使目标目录中没有文件)。

* git[/home/ubuntu] action checkout (up to date)

我做错了什么?

最佳答案

尝试:

git "/home/ubuntu/brukva" do
repository "git://github.com/kmerenkov/brukva.git"
revision "master"
action :sync
user "ubuntu"
end

如果使用 :checkout 时目标目录存在,它什么也不做,因为它假定您的 checkout 已经完成,您可以看到 chef 告诉“最新”。

引用source git 提供者

关于Chef Recipe 中的 Git checkout 不起作用,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19859978/

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