如何解决错误“stdout |(How to solve a error “stdout | fatal: A branch named 'deploy-old' already exists.”)

当使用git资源时,我得到以下错误:

INFO : Recipe: /Users/ironsand/dev/itamae_myserver/recipe.rb ERROR : stdout | fatal: A branch named 'deploy-old' already exists. ERROR : Command `cd /opt/my_project && git branch -m deploy-old` failed. (exit status: 128) ERROR : git[/opt/my_project] Failed.

如何解决问题?

When using git resource I got following error:

INFO : Recipe: /Users/ironsand/dev/itamae_myserver/recipe.rb ERROR : stdout | fatal: A branch named 'deploy-old' already exists. ERROR : Command `cd /opt/my_project && git branch -m deploy-old` failed. (exit status: 128) ERROR : git[/opt/my_project] Failed.

How to solve the problem?

最满意答案

为了解决这个问题,我登录了服务器并删除了deploy-old分支。

ssh my_server cd /opt/my_project sudo git branch -d deploy-old

之后,我可以无误地应用食谱。

To solve the problem I login the server and delete the branch deploy-old.

ssh my_server cd /opt/my_project sudo git branch -d deploy-old

After that I could apply the recipe without error.

如何解决错误“stdout |(How to solve a error “stdout | fatal: A branch named 'deploy-old' already exists.”)

当使用git资源时,我得到以下错误:

INFO : Recipe: /Users/ironsand/dev/itamae_myserver/recipe.rb ERROR : stdout | fatal: A branch named 'deploy-old' already exists. ERROR : Command `cd /opt/my_project && git branch -m deploy-old` failed. (exit status: 128) ERROR : git[/opt/my_project] Failed.

如何解决问题?

When using git resource I got following error:

INFO : Recipe: /Users/ironsand/dev/itamae_myserver/recipe.rb ERROR : stdout | fatal: A branch named 'deploy-old' already exists. ERROR : Command `cd /opt/my_project && git branch -m deploy-old` failed. (exit status: 128) ERROR : git[/opt/my_project] Failed.

How to solve the problem?

最满意答案

为了解决这个问题,我登录了服务器并删除了deploy-old分支。

ssh my_server cd /opt/my_project sudo git branch -d deploy-old

之后,我可以无误地应用食谱。

To solve the problem I login the server and delete the branch deploy-old.

ssh my_server cd /opt/my_project sudo git branch -d deploy-old

After that I could apply the recipe without error.