Closed
Description
π£οΈ Foreword
Thank for taking the time to fill this bug report fully. Without it we may not be able to fix the bug, and the issue may be closed without resolution.
π» Brief Description
Looks like the git resources changes in chef 16 are at it again. Cannot force update the current branch.
error is back again and this time it's using the legacy deploy
branch so i'm not sure how to fix this. I checked on the ruby-build repo and theres no branch called deploy there. Not sure if this is a cookbook or upstream issue but it would be nice to get a proper fix for this so it doesn't happen again.
π₯ Cookbook version
2.4.0 (latest)
π©βπ³ Chef-Infra Version
System Info:
------------
chef_version=16.2.73
platform=ubuntu
platform_version=18.04
ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef-workstation/bin/chef-client
π© Platform details
System Info:
------------
chef_version=16.2.73
platform=ubuntu
platform_version=18.04
ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef-workstation/bin/chef-client
Steps To Reproduce
Steps to reproduce the behavior:
add a simple ruby resource to the recipe:
rbenv_ruby '2.6.1' do
user 'user'
end
π Expected behavior
Successful converge
β Additional context
System Info:
------------
chef_version=16.2.73
platform=ubuntu
platform_version=18.04
ruby=ruby 2.7.1p83 (2020-03-31 revision a0c7c23c9c) [x86_64-linux]
program_name=/usr/bin/chef-client
executable=/opt/chef-workstation/bin/chef-client
================================================================================
Error executing action `install` on resource 'rbenv_ruby[2.6.1]'
================================================================================
Mixlib::ShellOut::ShellCommandFailed
------------------------------------
rbenv_plugin[ruby-build] (/var/chef/cache/cookbooks/ruby_rbenv/resources/ruby.rb line 41) had an error: Mixlib::ShellOut::ShellCommandFailed: git[Install ruby-build plugin] (/var/chef/cache/cookbooks/ruby_rbenv/resources/plugin.rb line 32) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '128'
---- Begin output of git branch -f deploy 16421762a6a7901c1c12811940187e40f7dfc3b9 ----
STDOUT:
STDERR: fatal: Cannot force update the current branch.
---- End output of git branch -f deploy 16421762a6a7901c1c12811940187e40f7dfc3b9 ----
Ran git branch -f deploy 16421762a6a7901c1c12811940187e40f7dfc3b9 returned 128