GithubHelp home page GithubHelp logo

sous-chefs / git Goto Github PK

View Code? Open in Web Editor NEW
121.0 39.0 183.0 457 KB

Development repository for the git cookbook

Home Page: https://supermarket.chef.io/cookbooks/git

License: Apache License 2.0

Ruby 97.84% HTML 2.16%
chef hacktoberfest chef-cookbook chef-resource git managed-by-terraform

git's Introduction

Git Cookbook

Cookbook Version CI State OpenCollective OpenCollective License

Installs git_client from package or source. Optionally sets up a git service under xinetd.

Scope

This cookbook is concerned with the Git SCM utility. It does not address ecosystem tooling or related projects.

Maintainers

This cookbook is maintained by the Sous Chefs. The Sous Chefs are a community of Chef cookbook maintainers working together to maintain important cookbooks. If you’d like to know more please visit sous-chefs.org or come chat with us on the Chef Community Slack in #sous-chefs.

Requirements

Chef

  • Chef 15.3+

Cookbooks

  • ark (for git_client source install)

Usage

Include git::default, git::windows, or git::source in your cookbook OR use the git_client resource directly.

Resources Overview

  • git_client: Manages a Git client installation on a machine. Source install action is available on Linux.
  • git_config: Sets up Git configuration on a node.

Recipes

This cookbook ships with ready to use, attribute driven recipes that utilize the git_client and git_service resources. As of cookbook 4.x, they utilize the same attributes layout scheme from the 3.x. Due to some overlap, it is currently impossible to simultaneously install the Git client as a package and from source by using the "manipulate the node attributes and run a recipe" technique. If you need both, you'll need to utilize the git_client resource in a recipe.

Attributes

Windows

  • node['git']['version'] - git version to install
  • node['git']['url'] - URL to git package
  • node['git']['checksum'] - package SHA256 checksum
  • node['git']['display_name'] - windows_package resource Display Name (makes the package install idempotent)

Linux

  • node['git']['prefix'] - git install directory
  • node['git']['version'] - git version to install
  • node['git']['url'] - URL to git tarball
  • node['git']['checksum'] - tarball SHA256 checksum
  • node['git']['use_pcre'] - if true, builds git with PCRE enabled

Contributors

This project exists thanks to all the people who contribute.

Backers

Thank you to all our backers!

https://opencollective.com/sous-chefs#backers

Sponsors

Support this project by becoming a sponsor. Your logo will show up here with a link to your website.

https://opencollective.com/sous-chefs/sponsor/0/website https://opencollective.com/sous-chefs/sponsor/1/website https://opencollective.com/sous-chefs/sponsor/2/website https://opencollective.com/sous-chefs/sponsor/3/website https://opencollective.com/sous-chefs/sponsor/4/website https://opencollective.com/sous-chefs/sponsor/5/website https://opencollective.com/sous-chefs/sponsor/6/website https://opencollective.com/sous-chefs/sponsor/7/website https://opencollective.com/sous-chefs/sponsor/8/website https://opencollective.com/sous-chefs/sponsor/9/website

git's People

Contributors

adamhjk avatar alex-slynko avatar bflad avatar brianhob27 avatar chewi avatar damacus avatar daspilker avatar eheydrick avatar fnichol avatar guilhem avatar hughsaunders avatar iennae avatar ifel avatar johnbellone avatar joncotton avatar kitchen-porter avatar myabc avatar nathenharvey avatar pierrerambaud avatar ramereth avatar renovate[bot] avatar reset avatar rgeyer avatar sauraus avatar scalp42 avatar sethvargo avatar smurawski avatar tas50 avatar vinyar avatar xorimabot avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

git's Issues

Warning about ambiguous provider preference

On Ubuntu 14.04 I get the following warning with include_recipe 'git':

WARN: Ambiguous provider precedence: [Chef::Provider::GitClient::Package, Chef::Provider::GitClient::Source], please use Chef.set_provider_priority_array to provide determinism

How to fix this?

Attribute 'revision' does not checkout proper branch

If you specific a branch for 'revision' only 'master' is ever used UNLESS you manually checkout a different branch, then the code NEVER changes it if told to use a different one.

e.g:

branch_name = 'production'
git "/home/user/deployment" do
   repository "[email protected]:some_group/some_repo.git"
   revision branch_name
end

If the branch_name is production, master is checked out in this example. If you manually checkout to production later, the code will continue to sync the currently checkout branch (at that point).

git install fails: syntax error: unknown group 'mlocate' in statoverride file

Cookbook version

4.6.0

Chef-client version

Chef 12.7.2

Platform Details

AWS EC2: Ubuntu 14.04 fresh install

Scenario:

Install git client on freshly booted ec2 instance

Steps to Reproduce:

Boot a (fresh) instance in OpsWorks, with a setup recipe that runs
git_client 'default' do action :install end

Actual Result:

[2016-08-19T14:38:17+00:00] INFO: Processing apt_package[default :create git] action install (/var/chef/runs/20045579-685c-4541-8a4c-9250c8221a1e/local-mode-cache/cache/cookbooks/git/libraries/provider_git_client_package.rb line 14)

Error executing action 'install' on resource 'apt_package[default :create git]'

Mixlib::ShellOut::ShellCommandFailed

Expected process to exit with [0], but received '100'
---- Begin output of apt-get -q -y install git=1:1.9.1-1ubuntu0.3 ----
STDOUT: Reading package lists...
Building dependency tree...
Reading state information...
The following extra packages will be installed:
git-man liberror-perl
Suggested packages:
git-daemon-run git-daemon-sysvinit git-doc git-el git-email git-gui gitk
gitweb git-arch git-bzr git-cvs git-mediawiki git-svn
The following NEW packages will be installed:
git git-man liberror-perl
0 upgraded, 3 newly installed, 0 to remove and 0 not upgraded.
Need to get 3306 kB of archives.
After this operation, 21.9 MB of additional disk space will be used.
Get:1 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty/main liberror-perl all 0.17-1.1 [21.1 kB]
Get:2 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main git-man all 1:1.9.1-1ubuntu0.3 [699 kB]
Get:3 http://eu-west-1.ec2.archive.ubuntu.com/ubuntu/ trusty-updates/main git amd64 1:1.9.1-1ubuntu0.3 [2586 kB]
Fetched 3306 kB in 0s (41.6 MB/s)
STDERR: dpkg: unrecoverable fatal error, aborting:
syntax error: unknown group 'mlocate' in statoverride file
E: Sub-process /usr/bin/dpkg returned an error code (2)
---- End output of apt-get -q -y install git=1:1.9.1-1ubuntu0.3 ----
Ran apt-get -q -y install git=1:1.9.1-1ubuntu0.3 returned 100

Resource Declaration:

In /var/chef/runs/20045579-685c-4541-8a4c-9250c8221a1e/local-mode-cache/cache/cookbooks/git/libraries/provider_git_client_package.rb

14: package "#{new_resource.name} :create #{parsed_package_name}" do
15: package_name parsed_package_name
16: version parsed_package_version
17: action new_resource.package_action
18: action :install
19: end
20: end

Compiled Resource:

Declared in /var/chef/runs/20045579-685c-4541-8a4c-9250c8221a1e/local-mode-cache/cache/cookbooks/git/libraries/provider_git_client_package.rb:14:in `block in class:Package'

apt_package("default :create git") do
package_name "git"
action [:install]
retries 0
retry_delay 2
default_guard_interpreter :default
declared_type :package
cookbook_name "servu-stack"
end

Compiled git is compiled (in Ubuntu / Debian) using GNUTLS instead of OpenSSL

On latest releases on Debian and Ubuntu (14.04 LTS) the Git has been compiled against GNUTLS instead of OpenSSL. It would be a nice feature when doing source install to decide which one you want to compile against for - because there is a difference. If you compile Git from source - it will compile itself (by default) against OpenSSL. Just a thought...

getting issue while installing git on a node from chefdk

Cookbook version

6.1.0

Chef-client version

chef-13.2.20

Platform Details

centos7.3: nodes and chef server
windows 10 : chefDK

Scenario:

trying to install git on a node from checkDK command prompt.

Steps to Reproduce:

-ChefDK v2.0.28 on windows10
-chef server
[root@indretest-0 ~]# rpm -qa|grep chef
chef-manage-2.5.3-1.el7.x86_64
chef-server-core-12.15.7-1.el7.x86_64
-installed the cookbook in chef-repo/cookbooks on chefkdk
-added the cookbook in runlist of the node
-tried to install git as below:
PS C:\Users\e3018705\chef-repo> knife job start chef-client indretest-1
C:/opscode/chefdk/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- chef/rest (LoadError) from C:/opscode/chefdk/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/knife-push-1.0.2/lib/chef/knife/job_start.rb:27:in block in <class:JobStart>' from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:232:in block in load_deps'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:231:in each' from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:231:in load_deps'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:216:in run' from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/application/knife.rb:156:in run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/bin/knife:25:in <top (required)>' from C:/opscode/chefdk/modules/chef/../../bin/knife:275:in load'
from C:/opscode/chefdk/modules/chef/../../bin/knife:275:in `

'

Expected Result:

A version of git should get installed as the purpose of this cookbook

Actual Result:

getting exception as below:
PS C:\Users\e3018705\chef-repo> knife job start chef-client indretest-1
C:/opscode/chefdk/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require': cannot load such file -- chef/rest (LoadError) from C:/opscode/chefdk/embedded/lib/ruby/2.4.0/rubygems/core_ext/kernel_require.rb:55:in require'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/knife-push-1.0.2/lib/chef/knife/job_start.rb:27:in block in <class:JobStart>' from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:232:in block in load_deps'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:231:in each' from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:231:in load_deps'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/knife.rb:216:in run' from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/lib/chef/application/knife.rb:156:in run'
from C:/opscode/chefdk/embedded/lib/ruby/gems/2.4.0/gems/chef-13.2.20-universal-mingw32/bin/knife:25:in <top (required)>' from C:/opscode/chefdk/modules/chef/../../bin/knife:275:in load'
from C:/opscode/chefdk/modules/chef/../../bin/knife:275:in `

'

Dependency Dashboard

This issue lists Renovate updates and detected dependencies. Read the Dependency Dashboard docs to learn more.

Open

These updates have all been created already. Click a checkbox below to force a retry/rebase of any.

Detected dependencies

github-actions
.github/workflows/ci.yml
  • sous-chefs/.github 3.0.0
  • actions/checkout v4
  • actionshub/chef-install 2.0.4
  • actionshub/test-kitchen 2.1.0
  • actions/checkout v4
  • actionshub/chef-install 2.0.4
  • actionshub/test-kitchen 2.1.0
  • actions/checkout v4
  • actionshub/chef-install 2.0.4
  • actionshub/test-kitchen 2.1.0
.github/workflows/stale.yml
  • actions/stale v8

  • Check this box to trigger a request for Renovate to run again on this repository

Invalid return

Upon trying to upload the latest version of this cookbook to chef, knife complains with the following error.

On a related note, I get the same error with the rsyslog cookbook. Is return not a thing anymore?

FATAL: Cookbook file recipes/server.rb has a ruby syntax error:
FATAL: /Users/mwestbom/code/chef-repo/.chef/../cookbooks/git/recipes/server.rb:18: Invalid return
FATAL: /Users/mwestbom/code/chef-repo/.chef/../cookbooks/git/recipes/server.rb:36: Invalid return

git_client::source installs twice 1.9.5 default and then the target

I am setting wrapper cookbook to depend on git cookbook.
To install version 2.0.4 of the git_client from tarball, I do...

include_recipe 'git::source'

git_client 'default' do
  action :install
  source_url 'https://www.kernel.org/pub/software/scm/git/git-2.0.4.tar.gz'
  source_version '2.0.4'
  source_checksum 'dd9df02b7dcc75f9777c4f802c6b8562180385ddde4e3b8479e079f99cd1d1c9'
end

what happens is that it installs 1.9.5 and then 2.0.4


             - update content in file /tmp/kitchen/cache/git-1.9.5.tar.gz from none to 0f3098


           * execute[Extracting and Building Git 1.9.5 from Source] action run
             - execute     (mkdir git-1.9.5 && tar -zxf git-1.9.5.tar.gz -C git-1.9.5 --strip-components 1)
          (cd git-1.9.5 && make prefix=/usr/local  install)


       Recipe: app_jenkins::_install_prereqs

           * yum_package[expat-devel] action install (up to date)
           * yum_package[gettext-devel] action install (up to date)
           * yum_package[libcurl-devel] action install (up to date)
        (up to date)
        (up to date)
        (up to date)


             - update content in file /tmp/kitchen/cache/git-2.0.4.tar.gz from none to dd9df0


       * execute[Extracting and Building Git 2.0.4 from Source] action run
             - execute     (mkdir git-2.0.4 && tar -zxf git-2.0.4.tar.gz -C git-2.0.4 --strip-components 1)
          (cd git-2.0.4 && make prefix=/usr/local  install)

STDERR: No provider of 'git=2.26.2-27.36.1' found.

Hey,

I am using the recipe and works just fine on our win/rhel/centos machines.

It fails however on suse. This is the console log from the execution of the command sudo chef-client -o 'recipe[git]'
Recipe version: 10.0.0

[2020-07-17T15:05:53.153Z] Processing sofumsuse06.eur.ad.sag
[2020-07-17T15:05:54.364Z] Processing sofumsuse06.eur.ad.sag
[2020-07-17T15:05:54.639Z] + sudo chef-client -o 'recipe[git]'
[2020-07-17T15:06:02.764Z] Starting Chef Client, version 14.13.11�[0m
[2020-07-17T15:06:12.701Z] [2020-07-17T17:52:34+03:00] WARN: Run List override has been provided.
[2020-07-17T15:06:12.701Z] [2020-07-17T17:52:34+03:00] WARN: Original Run List: []
[2020-07-17T15:06:12.701Z] [2020-07-17T17:52:34+03:00] WARN: Overridden Run List: [recipe[git]]
[2020-07-17T15:06:12.701Z] resolving cookbooks for run list: ["git"]�[0m
[2020-07-17T15:06:12.701Z] Synchronizing Cookbooks:�[0m
[2020-07-17T15:06:12.701Z]   - git (10.0.0)�[0m
[2020-07-17T15:06:12.701Z] Installing Cookbook Gems:�[0m
[2020-07-17T15:06:12.701Z] Compiling Cookbooks...�[0m
[2020-07-17T15:06:12.701Z] Converging 1 resources�[0m
[2020-07-17T15:06:12.701Z] Recipe: git::package�[0m
[2020-07-17T15:06:12.701Z]   * git_client[default] action install
[2020-07-17T15:06:19.228Z]     * zypper_package[default :create git] action install
[2020-07-17T15:06:19.228Z]       �[0m
[2020-07-17T15:06:19.228Z]       ================================================================================�[0m
[2020-07-17T15:06:19.228Z]       �[31mError executing action `install` on resource 'zypper_package[default :create git]'�[0m
[2020-07-17T15:06:19.228Z]       ================================================================================�[0m
[2020-07-17T15:06:19.228Z]       
[2020-07-17T15:06:19.228Z] �[0m      Mixlib::ShellOut::ShellCommandFailed�[0m
[2020-07-17T15:06:19.228Z]       ------------------------------------�[0m
[2020-07-17T15:06:19.228Z]       Expected process to exit with [0], but received '104'
[2020-07-17T15:06:19.228Z] �[0m      ---- Begin output of ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] ----
[2020-07-17T15:06:19.228Z] �[0m      STDOUT: Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP4_x86_64'.
[2020-07-17T15:06:19.228Z] �[0m      Loading repository data...
[2020-07-17T15:06:19.228Z] �[0m      Reading installed packages...
[2020-07-17T15:06:19.228Z] �[0m      'git=2.26.2-27.36.1' not found in package names. Trying capabilities.
[2020-07-17T15:06:19.228Z] �[0m      STDERR: No provider of 'git=2.26.2-27.36.1' found.
[2020-07-17T15:06:19.228Z] �[0m      ---- End output of ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] ----
[2020-07-17T15:06:19.228Z] �[0m      Ran ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] returned 104�[0m
[2020-07-17T15:06:19.228Z]       
[2020-07-17T15:06:19.228Z] �[0m      Resource Declaration:�[0m
[2020-07-17T15:06:19.228Z]       ---------------------�[0m
[2020-07-17T15:06:19.228Z]       # In /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb
[2020-07-17T15:06:19.228Z] �[0m      
[2020-07-17T15:06:19.228Z] �[0m        9:           package "#{new_resource.name} :create #{parsed_package_name}" do
[2020-07-17T15:06:19.228Z] �[0m       10:             package_name parsed_package_name
[2020-07-17T15:06:19.228Z] �[0m       11:             version parsed_package_version
[2020-07-17T15:06:19.228Z] �[0m       12:             action new_resource.package_action
[2020-07-17T15:06:19.228Z] �[0m       13:             action :install
[2020-07-17T15:06:19.228Z] �[0m       14:           end
[2020-07-17T15:06:19.228Z] �[0m       15:         end
[2020-07-17T15:06:19.228Z] �[0m      
[2020-07-17T15:06:19.228Z] �[0m      Compiled Resource:�[0m
[2020-07-17T15:06:19.228Z]       ------------------�[0m
[2020-07-17T15:06:19.228Z]       # Declared in /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:9:in `block in <class:Package>'
[2020-07-17T15:06:19.228Z] �[0m      
[2020-07-17T15:06:19.228Z] �[0m      zypper_package("default :create git") do
[2020-07-17T15:06:19.228Z] �[0m        package_name "git"
[2020-07-17T15:06:19.228Z] �[0m        action [:install]
[2020-07-17T15:06:19.228Z] �[0m        default_guard_interpreter :default
[2020-07-17T15:06:19.228Z] �[0m        declared_type :package
[2020-07-17T15:06:19.228Z] �[0m        cookbook_name "git"
[2020-07-17T15:06:19.228Z] �[0m        version nil
[2020-07-17T15:06:19.228Z] �[0m      end
[2020-07-17T15:06:19.228Z] �[0m      
[2020-07-17T15:06:19.228Z] �[0m      System Info:�[0m
[2020-07-17T15:06:19.228Z]       ------------�[0m
[2020-07-17T15:06:19.228Z]       chef_version=14.13.11
[2020-07-17T15:06:19.228Z] �[0m      platform=suse
[2020-07-17T15:06:19.228Z] �[0m      platform_version=12.4
[2020-07-17T15:06:19.228Z] �[0m      ruby=ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
[2020-07-17T15:06:19.228Z] �[0m      program_name=/usr/bin/chef-client
[2020-07-17T15:06:19.228Z] �[0m      executable=/opt/chef/bin/chef-client�[0m
[2020-07-17T15:06:19.228Z]       
[2020-07-17T15:06:19.228Z] �[0m    �[0m
[2020-07-17T15:06:19.228Z]     ================================================================================�[0m
[2020-07-17T15:06:19.228Z]     �[31mError executing action `install` on resource 'git_client[default]'�[0m
[2020-07-17T15:06:19.228Z]     ================================================================================�[0m
[2020-07-17T15:06:19.228Z]     
[2020-07-17T15:06:19.228Z] �[0m    Mixlib::ShellOut::ShellCommandFailed�[0m
[2020-07-17T15:06:19.228Z]     ------------------------------------�[0m
[2020-07-17T15:06:19.228Z]     zypper_package[default :create git] (/var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb line 9) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '104'
[2020-07-17T15:06:19.228Z] �[0m    ---- Begin output of ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] ----
[2020-07-17T15:06:19.228Z] �[0m    STDOUT: Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP4_x86_64'.
[2020-07-17T15:06:19.228Z] �[0m    Loading repository data...
[2020-07-17T15:06:19.228Z] �[0m    Reading installed packages...
[2020-07-17T15:06:19.228Z] �[0m    'git=2.26.2-27.36.1' not found in package names. Trying capabilities.
[2020-07-17T15:06:19.228Z] �[0m    STDERR: No provider of 'git=2.26.2-27.36.1' found.
[2020-07-17T15:06:19.228Z] �[0m    ---- End output of ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] ----
[2020-07-17T15:06:19.228Z] �[0m    Ran ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] returned 104�[0m
[2020-07-17T15:06:19.228Z]     
[2020-07-17T15:06:19.228Z] �[0m    Resource Declaration:�[0m
[2020-07-17T15:06:19.228Z]     ---------------------�[0m
[2020-07-17T15:06:19.228Z]     # In /var/chef/cache/cookbooks/git/recipes/package.rb
[2020-07-17T15:06:19.228Z] �[0m    
[2020-07-17T15:06:19.228Z] �[0m     23:   git_client 'default' do
[2020-07-17T15:06:19.228Z] �[0m     24:     action :install
[2020-07-17T15:06:19.228Z] �[0m     25:   end
[2020-07-17T15:06:19.229Z] �[0m     26: end
[2020-07-17T15:06:19.229Z] �[0m    
[2020-07-17T15:06:19.229Z] �[0m    Compiled Resource:�[0m
[2020-07-17T15:06:19.229Z]     ------------------�[0m
[2020-07-17T15:06:19.229Z]     # Declared in /var/chef/cache/cookbooks/git/recipes/package.rb:23:in `from_file'
[2020-07-17T15:06:19.229Z] �[0m    
[2020-07-17T15:06:19.229Z] �[0m    git_client("default") do
[2020-07-17T15:06:19.229Z] �[0m      action [:install]
[2020-07-17T15:06:19.229Z] �[0m      default_guard_interpreter :default
[2020-07-17T15:06:19.229Z] �[0m      declared_type :git_client
[2020-07-17T15:06:19.229Z] �[0m      cookbook_name "git"
[2020-07-17T15:06:19.229Z] �[0m      recipe_name "package"
[2020-07-17T15:06:19.229Z] �[0m    end
[2020-07-17T15:06:19.229Z] �[0m    
[2020-07-17T15:06:19.229Z] �[0m    System Info:�[0m
[2020-07-17T15:06:19.229Z]     ------------�[0m
[2020-07-17T15:06:19.229Z]     chef_version=14.13.11
[2020-07-17T15:06:19.229Z] �[0m    platform=suse
[2020-07-17T15:06:19.229Z] �[0m    platform_version=12.4
[2020-07-17T15:06:19.229Z] �[0m    ruby=ruby 2.5.5p157 (2019-03-15 revision 67260) [x86_64-linux]
[2020-07-17T15:06:19.229Z] �[0m    program_name=/usr/bin/chef-client
[2020-07-17T15:06:19.229Z] �[0m    executable=/opt/chef/bin/chef-client�[0m
[2020-07-17T15:06:19.229Z]     
[2020-07-17T15:06:19.229Z] �[0m�[0m
[2020-07-17T15:06:19.229Z] Running handlers:�[0m
[2020-07-17T15:06:19.229Z] [2020-07-17T17:52:40+03:00] ERROR: Running exception handlers
[2020-07-17T15:06:19.229Z] Running handlers complete
[2020-07-17T15:06:19.229Z] �[0m[2020-07-17T17:52:40+03:00] ERROR: Exception handlers complete
[2020-07-17T15:06:19.229Z] Chef Client failed. 0 resources updated in 16 seconds�[0m
[2020-07-17T15:06:19.229Z] [2020-07-17T17:52:40+03:00] FATAL: Stacktrace dumped to /var/chef/cache/chef-stacktrace.out
[2020-07-17T15:06:19.229Z] [2020-07-17T17:52:40+03:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
[2020-07-17T15:06:19.229Z] [2020-07-17T17:52:40+03:00] FATAL: Mixlib::ShellOut::ShellCommandFailed: git_client[default] (git::package line 23) had an error: Mixlib::ShellOut::ShellCommandFailed: zypper_package[default :create git] (/var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb line 9) had an error: Mixlib::ShellOut::ShellCommandFailed: Expected process to exit with [0], but received '104'
[2020-07-17T15:06:19.229Z] ---- Begin output of ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] ----
[2020-07-17T15:06:19.229Z] STDOUT: Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP4_x86_64'.
[2020-07-17T15:06:19.229Z] Loading repository data...
[2020-07-17T15:06:19.229Z] Reading installed packages...
[2020-07-17T15:06:19.229Z] 'git=2.26.2-27.36.1' not found in package names. Trying capabilities.
[2020-07-17T15:06:19.229Z] STDERR: No provider of 'git=2.26.2-27.36.1' found.
[2020-07-17T15:06:19.229Z] ---- End output of ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] ----
[2020-07-17T15:06:19.229Z] Ran ["zypper", "--non-interactive", "install", "--auto-agree-with-licenses", "git=2.26.2-27.36.1"] returned 104
script returned exit code 1

stacktrace file: chef-stacktrace.log
console log: console.log

Version of the suse machine:

vmtest@sofumsuse06:~> cat /etc/*release*
NAME="SLES"
VERSION="12-SP4"
VERSION_ID="12.4"
PRETTY_NAME="SUSE Linux Enterprise Server 12 SP4"
ID="sles"
ANSI_COLOR="0;32"
CPE_NAME="cpe:/o:suse:sles:12:sp4"
SUSE Linux Enterprise Server 12 (x86_64)
VERSION = 12
PATCHLEVEL = 4

Stackrace file also says:

STDOUT: Refreshing service 'SUSE_Linux_Enterprise_Server_12_SP4_x86_64'.
Loading repository data...
Reading installed packages...
'git=2.26.2-27.36.1' not found in package names. Trying capabilities.
STDERR: No provider of 'git=2.26.2-27.36.1' found.

undefined method `provides' for Chef::Provider::GitClient::Osx:Class

Cookbook version

5.0.0

Chef-client version

[Version of chef-client in your environment]

Platform Details

Centos 6.5

Scenario:

Running chef client

Steps to Reproduce:

This is referenced from kibana_lwrp.

Expected Result:

Successful chef-client run

Actual Result:

NoMethodError

undefined method `provides' for Chef::Provider::GitClient::OS X:Class

The solution I think is changing provides :git_client, os: 'mac_os_x' to
provides :git_client, os: 'mac_os_x' if respond_to?(:provides)

Install from source not working on fedora

There are no package dependencies specified for fedora platform family (also i'm using platform version 17)

NoMethodError       
-------------       
undefined method `each' for nil:NilClass       


Cookbook Trace:       
---------------       
  /tmp/kitchen/cookbooks/git/recipes/source.rb:39:in `from_file'       
  /tmp/kitchen/cookbooks/helios-app-build/recipes/default.rb:16:in `from_file'       


Relevant File Content:       
----------------------       
/tmp/kitchen/cookbooks/git/recipes/source.rb:       

 32:    else       
 33:      pkgs = %w{ expat-devel gettext-devel curl-devel openssl-devel perl-ExtUtils-MakeMaker zlib-devel } if node['platform'] == 'amazon'       
 34:    end       
 35:  when 'debian'       
 36:    pkgs = %w{ libcurl4-gnutls-dev libexpat1-dev gettext libz-dev libssl-dev }       
 37:  end       
 38:         
        39>> pkgs.each do |pkg|
        40:    package pkg
        41:  end
        42:  
        43:  # reduce line-noise-eyness
        44:  remote_file "#{Chef::Config['file_cache_path']}/git-#{node['git']['version']}.tar.gz" do
        45:    source    node['git']['url']
        46:    checksum  node['git']['checksum']
        47:    mode      '0644'
        48:    not_if "test -f #{Chef::Config['file_cache_path']}/git-#{node['git']['version']}.tar.gz"

git submodules are not downloaded with git resource

git tests_dir do
repository node['xyz']['repo']
revision node['xyz']['branch']
enable_submodules true
action :sync
end

It is downloading the main parent repository but not the submodules. I am getting only the .gitmodules file and nothing else. Am I missing something very basic?

No resource or method named `git_client' for `Chef::Recipe "package"'

Using in vagrant context with chef_solo

Cookbook Trace:
==> default: ---------------
==> default: /tmp/vagrant-chef/8573ad60a7ce2c764a8ed5706df9f94d/cookbooks/git/recipes/package.rb:34:in from_file' ==> default: /tmp/vagrant-chef/8573ad60a7ce2c764a8ed5706df9f94d/cookbooks/git/recipes/default.rb:19:infrom_file'
==> default: /tmp/vagrant-chef/8573ad60a7ce2c764a8ed5706df9f94d/cookbooks/zsh/recipes/oh_my_zsh.rb:17:in `from_file'
==> default: Relevant File Content:
==> default: ----------------------
==> default: /tmp/vagrant-chef/8573ad60a7ce2c764a8ed5706df9f94d/cookbooks/git/recipes/package.rb:
==> default: 27: osx_dmg_url node['git']['osx_dmg']['url']
==> default: 28: osx_dmg_checksum node['git']['osx_dmg']['checksum']
==> default: 29: action :install
==> default: 30: end
==> default: 31: when 'windows'
==> default: 32: include_recipe 'git::windows'
==> default: 33: else
==> default: 34>> git_client 'default' do
==> default: 35: action :install
==> default: 36: end
==> default: 37: end
==> default: 38:

cookbook requires 13.0+ instead of 12.7+

Cookbook version

9.0.1

Chef-client version

12.16.42

Platform Details

CentOS 7.6

Scenario:

Currently, the README page states that this cookbook works with Chef versions 12.7+. I am using Chef version 12.16.42. The cookbook fails to converge do to a dependency constraint.

Steps to Reproduce:

Here's a simple .kitchen.yml to reproduce this ticket with depends 'git', '~> 9.0.1' in the metadata.rb.

---
driver:
  name: vagrant

provisioner:
  name: chef_zero
  product_name: chef
  product_version: 12.16.42
  multiple_converge: 2
  deprecations_as_errors: true
  enforce_idempotency: true

platforms:
  - name: centos-7.6
    driver:
      box: bento/centos-7.6

suites:
  - name: default
    run_list:
      - recipe[git::default]

Expected Result:

I'm expecting a kitchen converge to successfully complete.

Actual Result:

$ kitchen converge
-----> Starting Kitchen (v1.24.0)
-----> Creating <default-centos-76>...
       Bringing machine 'default' up with 'virtualbox' provider...
       ==> default: Importing base box 'bento/centos-7.6'...
==> default: Matching MAC address for NAT networking...
       ==> default: Checking if box 'bento/centos-7.6' version '201812.27.0' is up to date...
       ==> default: Setting the name of the VM: kitchen-my-git-wrapper-default-centos-76
       ==> default: Clearing any previously set network interfaces...
       ==> default: Preparing network interfaces based on configuration...
           default: Adapter 1: nat
       ==> default: Forwarding ports...
           default: 22 (guest) => 2222 (host) (adapter 1)
       ==> default: Running 'pre-boot' VM customizations...
       ==> default: Booting VM...
       ==> default: Waiting for machine to boot. This may take a few minutes...
           default: SSH address: 127.0.0.1:2222
           default: SSH username: vagrant
           default: SSH auth method: private key
           default: 
           default: Vagrant insecure key detected. Vagrant will automatically replace
           default: this with a newly generated keypair for better security.
           default: 
           default: Inserting generated public key within guest...
           default: Removing insecure key from the guest if it's present...
           default: Key inserted! Disconnecting and reconnecting using new SSH key...
       ==> default: Machine booted and ready!
       ==> default: Checking for guest additions in VM...
           default: The guest additions on this VM do not match the installed version of
           default: VirtualBox! In most cases this is fine, but in rare cases it can
           default: prevent things such as shared folders from working properly. If you see
           default: shared folder errors, please make sure the guest additions within the
           default: virtual machine match the version of VirtualBox you have installed on
           default: your host and reload your VM.
           default: 
           default: Guest Additions Version: 5.2.22
           default: VirtualBox Version: 6.0
       ==> default: Setting hostname...
       ==> default: Mounting shared folders...
           default: /tmp/omnibus/cache => /Users/jlosito/.kitchen/cache
       ==> default: Machine not provisioned because `--no-provision` is specified.
       [SSH] Established
       Vagrant instance <default-centos-76> created.
       Finished creating <default-centos-76> (0m35.66s).
-----> Converging <default-centos-76>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 7.0.7...
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Failed to complete #converge action: [Unable to satisfy constraints on package seven_zip due to solution constraint (my-git-wrapper = 0.1.0). Solution constraints that may result in a constraint on seven_zip: [(build-essential = 8.2.1) -> (seven_zip >= 0.0.0)], [(build-essential = 8.2.1) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 8.2.1) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 8.2.1) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 7.0.3) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 7.0.3) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 7.0.2) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 7.0.2) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 6.0.4) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 6.0.4) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 5.0.0) -> (seven_zip >= 0.0.0)], [(git = 9.0.1) -> (build-essential = 5.0.0) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(mingw = 2.1.0) -> (seven_zip >= 0.0.0)], [(seven_zip = 3.1.1)], [(wrapper-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 8.2.1) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 8.2.1) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 7.0.3) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 7.0.3) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 7.0.2) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 7.0.2) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 6.0.4) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 6.0.4) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 5.0.0) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (git = 9.0.1) -> (build-essential = 5.0.0) -> (mingw = {2.1.0,1.2.5,1.2.4}) -> (seven_zip >= 0.0.0)], [(my-git-wrapper = 0.1.0) -> (seven_zip = 3.0.0)]
Demand that cannot be met: (my-git-wrapper = 0.1.0)
Artifacts for which there are conflicting dependencies: seven_zip = 3.0.0 -> [(windows >= 0.0.0)]Unable to find a solution for demands: build-essential (8.2.1), git (9.0.1), mingw (2.1.0), seven_zip (3.1.1), my-git-wrapper (0.1.0), windows (6.0.0)] on default-centos-76
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

I believe the issue is that the build-essential cookbook depends on seven_zip which depends on Chef 13.0+. Thus in order to successfully converge the git cookbook, one will also requires Chef 13.0+.

documentation for git_client resource

Cookbook version

5.0.0

Chef-client version

N/A

Platform Details

N/A

Scenario:

How do I use the resource git_client? How do I tell it to install from source and not from package? The only piece of information provided by the doc is: action :install.

Steps to Reproduce:

[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]

Expected Result:

[What are you expecting to happen as the consequence of above reproduction steps?]

Actual Result:

[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]

NoMethodError-> undefined method `set' for Chef::Platform:Class

Cookbook version

4.6.0

Chef-client version

12.18.31
More Info:

$ chef --version
Chef Development Kit Version: 1.2.22
chef-client version: 12.18.31
delivery version: master (0b746cafed65a9ea1a79de3cc546e7922de9187c)
berks version: 2017-04-12T17:34:32.378170 15636] 2017-04-12T17:34:32.378671 15636] 2017-04-12T17:34:32.378671 15636] 2017-04-12T17:34:32.379172 15636] 2017-04-12T17:34:32.457883 15636] 2017-04-12T17:34:32.458383 15636] 5.6.0
kitchen version: 1.15.0

Platform Details

For Kitchen
Driver: Vagrant
Platform: centos-7.2

Scenario:

Need to have a Git client (default) for the target node.

       NoMethodError
       -------------
       undefined method 'set' for Chef::Platform:Class

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/git/libraries/z_provider_mapping.rb:6:in `<top (required)>'

Steps to Reproduce:

  1. I am developing a cookbook that will install Jenkins.
  2. I am using Git Cookbook to install git client on the target node.
  3. The 'include_recipe "git::default"' is called after creating the users (Jenkins) and some directories.
  4. It was converging without any issues earlier when I had this line in metadata.rb depends 'git', '~> 4.3'.
  5. Now, it doesn't seem to work and I am observing version 4.6.0 is used as verified in Berksfile.lock.

Expected Result:

Git Client should be installed! But instead I get this syntax error, saying 'set' is not found.

Actual Result:

$ kitchen converge
-----> Starting Kitchen (v1.15.0)
W, [2017-04-12T17:09:51.956502 #8552]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-04-12T17:09:51.956502 #8552]  WARN -- : You are setting a key that conflicts with a built-in method Hashie::Mash#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-04-12T17:09:51.957005 #8552]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-04-12T17:09:51.957005 #8552]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#frozen? defined in Kernel. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-04-12T17:09:51.967032 #8552]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
W, [2017-04-12T17:09:51.967533 #8552]  WARN -- : You are setting a key that conflicts with a built-in method VariaModel::Attributes#default defined in Hash. This can cause unexpected behavior when accessing the key via as a property. You can still access the key via the #[] method.
-----> Converging <default-centos-72>...
       Preparing files for transfer
       Preparing dna.json
       Resolving cookbook dependencies with Berkshelf 5.6.0...
       Removing non-cookbook files before transfer
       Preparing validation.pem
       Preparing client.rb
-----> Chef Omnibus installation detected (install only if missing)
       Transferring files to <default-centos-72>
       Starting Chef Client, version 13.0.118
       resolving cookbooks for run list: ["scm_jenkins::default"]
       Synchronizing Cookbooks:
         - scm_jenkins (0.1.0)
         - java (1.48.0)
         - git (4.6.0)
         - apt (6.0.1)
         - windows (3.0.5)
         - homebrew (3.0.0)
         - build-essential (8.0.0)
         - yum-epel (2.1.1)
         - ohai (5.0.3)
         - seven_zip (2.0.2)
         - mingw (2.0.0)
         - compat_resource (12.16.3)
         - dmg (3.1.0)
       Installing Cookbook Gems:
       Compiling Cookbooks...

       ================================================================================
       Recipe Compile Error in /tmp/kitchen/cache/cookbooks/git/libraries/z_provider_mapping.rb
       ================================================================================

       NoMethodError
       -------------
       undefined method `set' for Chef::Platform:Class

       Cookbook Trace:
       ---------------
         /tmp/kitchen/cache/cookbooks/git/libraries/z_provider_mapping.rb:6:in `<top (required)>'

       Relevant File Content:
       ----------------------
       /tmp/kitchen/cache/cookbooks/git/libraries/z_provider_mapping.rb:

         1:  # provider mappings for Chef 11
         2:
         3:  #########
         4:  # client
         5:  #########
         6>> Chef::Platform.set platform: :amazon, resource: :git_client, provider: Chef::Provider::GitClient::Package
         7:  Chef::Platform.set platform: :centos, resource: :git_client, provider: Chef::Provider::GitClient::Package
         8:  Chef::Platform.set platform: :debian, resource: :git_client, provider: Chef::Provider::GitClient::Package
         9:  Chef::Platform.set platform: :fedora, resource: :git_client, provider: Chef::Provider::GitClient::Package
        10:  Chef::Platform.set platform: :mac_os_x, resource: :git_client, provider: Chef::Provider::GitClient::Osx
        11:  Chef::Platform.set platform: :redhat, resource: :git_client, provider: Chef::Provider::GitClient::Package
        12:  Chef::Platform.set platform: :scientific, resource: :git_client, provider: Chef::Provider::GitClient::Package
        13:  Chef::Platform.set platform: :smartos, resource: :git_client, provider: Chef::Provider::GitClient::Package
        14:  Chef::Platform.set platform: :solaris2, resource: :git_client, provider: Chef::Provider::GitClient::Package
        15:  Chef::Platform.set platform: :suse, resource: :git_client, provider: Chef::Provider::GitClient::Package

       System Info:
       ------------
       chef_version=13.0.118
       platform=centos
       platform_version=7.2.1511
       ruby=ruby 2.4.1p111 (2017-03-22 revision 58053) [x86_64-linux]
       program_name=chef-client worker: ppid=11846;start=00:10:07;
       executable=/opt/chef/bin/chef-client


       Running handlers:
       [2017-04-13T00:10:09+00:00] ERROR: Running exception handlers
       [2017-04-13T00:10:09+00:00] ERROR: Running exception handlers
       Running handlers complete
       [2017-04-13T00:10:09+00:00] ERROR: Exception handlers complete
       [2017-04-13T00:10:09+00:00] ERROR: Exception handlers complete
       Chef Client failed. 0 resources updated in 01 seconds
       [2017-04-13T00:10:09+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2017-04-13T00:10:09+00:00] FATAL: Stacktrace dumped to /tmp/kitchen/cache/chef-stacktrace.out
       [2017-04-13T00:10:09+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-04-13T00:10:09+00:00] FATAL: Please provide the contents of the stacktrace.out file if you file a bug report
       [2017-04-13T00:10:09+00:00] ERROR: undefined method `set' for Chef::Platform:Class
       [2017-04-13T00:10:09+00:00] ERROR: undefined method `set' for Chef::Platform:Class
       [2017-04-13T00:10:09+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
       [2017-04-13T00:10:09+00:00] FATAL: Chef::Exceptions::ChildConvergeError: Chef run process exited unsuccessfully (exit code 1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: 1 actions failed.
>>>>>>     Converge failed on instance <default-centos-72>.  Please see .kitchen/logs/default-centos-72.log for more details
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

package_version doesn't install the specified version

Cookbook version

6.0.0

Chef-client version

12.18.31

Platform Details

ubuntu 14 & 16

Scenario:

Trying to install a specific version in Ubuntu

Steps to Reproduce:

  • create a dummy cookbook and only use ubuntu 16 as the platform
  • create a attribute file and add the line default['git']['package_version'] = '2.11.0'
  • add git cookbook as a dependency and add include_recipe 'git' in the default recipe
  • converge in vagrant
  • login and run git --version

Expected Result:

2.11.0

Actual Result:

2.7.4

Comment

I've skimmed through the code and package_version is defined in the resource but it's never been passed a value. Is this the intended behaviour or is this just some outdated feature from 2 years ago?
https://github.com/chef-cookbooks/git/blame/master/README.md#L92

64-bit Git Install Incorrectly Updates Path On Windows

There are 64-bit builds of Git. The current cookbook does not handle this.

Steps to reproduce

Set the version to download as such:

    "git": {
      "version": "2.7.2.windows.1",
      "checksum": "ec4009b36ce855ab262f999030fff5471de73cf0071202138d395648756c7e8b",
      "url": "https://github.com/git-for-windows/git/releases/download/v2.7.2.windows.1/Git-2.7.2-64-bit.exe",
      "display_name": "Git version 2.7.2"
    }

The PATH is incorrectly updated to use the (x86) path erroneously on windows. This makes all future calls to git fail.

Source recipe fails on subsequent converge if package based install used in between

Cookbook version

5.0.1

Chef-client version

12.10.24

Platform Details

CentOS 7.2 Bento Box

Scenario:

Converge fails due to error:

mkdir: cannot create directory ‘git-2.6.2’: File exists

Steps to Reproduce:

We're using the git::source recipe to install git 2.6.2 on CentOS 7.2. Initial converge works great, source based install succeeds, and we have git 2.6.2 on the PATH. I think what's happening is that something else in our converge is inadvertently doing a packaged based install of git, and then the next time git::source the guard passes since git --version returns 1.8.3.1, so git::source thinks it needs to install it again. It fails to extract it because the extracted version already exists in Chef::Config['file_cache_path'].

So it's admittedly a bug in our converge that the package based install of git is happening, but it seems like something that this cookbook should be able to recover from.

Here's the relevant chunk from the converge output: https://gist.github.com/fletchowns/cdab5e1f58722fd4d9cd6f4492fa3e52

Expected Result:

It seems like the git::source recipe should be able to handle the output directory in Chef::Config['file_cache_path'] already existing by using a mkdir -p or something instead of just a mkdir.

Actual Result:

The converge fails because the cache directory already exists.

No need to download sources if the installed version is same as expected version.

https://github.com/chef-cookbooks/git/blob/355ca0e7097571b216b315292580c0dba449dd68/libraries/provider_git_client_source.rb#L30

Every time chef-client runs, it will make sure git-source.tar.gz is present on the node. If the installed Git version is same as expected git version, then there is no need to download the source code of git. So rather than checking for remote file not found, we can check for installed version.

Changes to prefix not supported

I just ran into this issue while installing git from source on a centos Jenkins slave in order to upgrade the version. I initially ran the recipe with the default prefix of /usr/local. This was fine except that I realised that Jenkins jobs do not run in a real login session and as such /usr/local/bin is not on the path (or at least not before /usr/bin where the previous version of git was installed). This was confusing as when I logged into the machine git --version would report 2.0.0 while Jenkins jobs would get 1.7.1.

The obvious fix was to update my recipe to override the prefix to /usr. However when I do this the recipe does not actually do anything as there is a not_if check on the git version which gets a path as if it were a login session.

I think the fix is to add the prefix to the not_if check to make sure the correct version is installed where it is expected. I think it may also be required to remove any old build directory too (at least so mkdir doesn't fail but also to clean any artifacts built with the old prefix).

Something like this in libraries/provider_git_client_source.rb

          execute "Extracting and Building Git #{node['git']['version']} from Source" do
            cwd Chef::Config['file_cache_path']
            command <<-COMMAND
    (rm -rf git-#{node['git']['version']} && mkdir git-#{node['git']['version']} && tar -zxf git-#{node['git']['version']}.tar.gz -C git-#{node['git']['version']} --strip-components 1)
    (cd git-#{node['git']['version']} && make prefix=#{node['git']['prefix']} install)
  COMMAND
            not_if "#{node['git']['prefix']}/bin/git --version | grep #{node['git']['version']}"
          end

Without this i had to log in to the box and run the following to workaround the problem:

rm -rf /var/chef/cache/git-2.0.0
rm -f /usr/local/bin/git
chef-client

Bad key override in Chef::NodeMap filter expression

Getting this with new version 4.2.4

Compiling Cookbooks...

================================================================================
Recipe Compile Error in /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb
================================================================================

RuntimeError
------------
Bad key override in Chef::NodeMap filter expression

Cookbook Trace:
---------------
  /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:7:in `<class:Package>'
  /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:4:in `<class:GitClient>'
  /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:3:in `<class:Provider>'
  /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:2:in `<class:Chef>'
  /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:1:in `<top (required)>'

Relevant File Content:
----------------------
/var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:

  1:  class Chef
  2:    class Provider
  3:      class GitClient
  4:        class Package < Chef::Provider::GitClient
  5:          include Chef::DSL::IncludeRecipe
  6:
  7>>         provides :git_client, os: 'linux', override: true if respond_to?(:provides)
  8:
  9:          action :install do
 10:            # FIXME: rhel 5
 11:            include_recipe 'yum-epel' if node['platform_family'] == 'rhel' && node['platform_version'].to_i == 5
 12:
 13:            # Software installation
 14:            package "#{new_resource.name} :create #{parsed_package_name}" do
 15:              package_name parsed_package_name
 16:              version parsed_package_version


Running handlers:
Running handlers complete
Chef Client failed. 0 resources updated in 4.953087 seconds

Default provider change

Because of 641380e, the default provider is now Source instead of Package. This should be handled more explicitly with a priority map setting. This represents a reversion from 4.2.2 to 4.2.3.

Windows PATH bug

👻 Brief Description

I was using this cookbook as a reference for one I am writing and while just reading the source code I believe I happened across a latent bug in the handling of adding the git installation path to the Windows PATH

I am 99.99% sure that at https://github.com/sous-chefs/git/blob/main/resources/client_windows.rb#L38 the code should be:

not_if { ENV['PATH'] =~ /#{GIT_PATH}/ }
and NOT
not_if { ENV['PATH'] =~ /GIT_PATH/ }
as you don't want to be looking for the string literal "GIT_PATH" but the value of that variable, interpolated.

🥞 Cookbook version

11.1 but expect that this exists in far earlier versions.

👩‍🍳 Chef-Infra Version

N/A

🎩 Platform details

N/A

Steps To Reproduce

N/A

🚓 Expected behavior

N/A

➕ Additional context

N/A

Checkout modifies mtimes

Cookbook version

6.1.0

Chef-client version

12.19.36

Platform Details

Linux/debian

Scenario:

Checkout on an existing repo modifies mtimes in the directory

  git site.www_root do
    repository "..."
    revision "#{new_resource.version}-branch"
    user new_resource.owner
    group new_resource.group
    depth 1

    action :checkout
  end

Steps to Reproduce:

  1. Run cookbook once to create a checkout
  2. Modify some files in the directory, and add a few unversioned ones
  3. Rerun cookbook

Expected Result:

No action, all files' mtimes stay the same

Actual Result:

No action, but mtimes are changed to the time the cookbook was run the second time

Funky % parsing for attributes breaks basic Windows usage

Cookbook version

5.0.2

Chef-client version

12.12.15

Platform Details

Windows Server 2012 R2

Scenario:

Just trying to use the most basic part of the recipe: Install git client.

Steps to Reproduce:

git_client 'default' do
  action :install
end

Expected Result:

Git client to be installed.

Actual Result:

    URI::InvalidURIError
    --------------------
    windows_package[Git version 2.7.4] (C:/chef/cache/cookbooks/git/libraries/pr
ovider_git_client_windows.rb line 11) had an error: URI::InvalidURIError: bad UR
I(is not URI?): https://github.com/git-for-windows/git/releases/download/v%2.7.4
.windows.1/Git-%2.7.4-32-bit.exe

Basic git authentication support needed for Windows environments

Windows Chef Developer Here. All our systems are Windows (client, server, source control, CI, etc - everything).

The primary Windows-centric source control systems (TFS2013 and Visual Studio Online) do not support ssh keys and only support the use of oAuth or username/password for git repositories.

Without support for basic authentication features in this git cookbook, the use of git within Windows-centric environments with enterprise class development systems is not possible.

Thanks!

### :speaking_head

🗣️ 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

A clear and concise description of what the bug is.

🥞 Cookbook version

Version of the cookbook where you are encountering the issue.

👩‍🍳 Chef-Infra Version

Version of chef-client in your environment.

🎩 Platform details

Operating system distribution and release version. Cloud provider if running in the cloud.

Steps To Reproduce

Steps to reproduce the behavior:

  1. Go to '...'
  2. Click on '....'
  3. Scroll down to '....'
  4. See error

🚓 Expected behavior

A clear and concise description of what you expected to happen.

➕ Additional context

Add any other context about the problem here. e.g. related issues or existing pull requests.

Multiple Problems with non/default Windows Git Installation

I am attempting to install Git for Windows 2.6.3 x64 with this cookbook and have encountered numerous problems.

First I attempted the following:

# My attributes/default.rb:
override['git']['version'] = '2.6.3'
override['git']['architecture'] = '64'
override['git']['url'] = "https://github.com/git-for-windows/git/releases/download/v#{node['git']['version']}.windows.1/Git-#{node['git']['version']}-#{node['git']['architecture']}-bit.exe"
override['git']['checksum'] = 'da1ce21bbaf1dcfd0a8c14e37cedc2d7a0948d01b69efbecbf8eb12fe91c3549'
override['git']['display_name'] = "Git version #{node['git']['version']}"

Then:

# My recipes/default.rb:
include_recipe 'git'

This didn't work. Digging through the cookbook code I discovered that the above attributes are only honored by the git::windows recipe. When the default recipe is invoked, hardcoded defaults from the helper.rb file seem to be what gets used.

I updated my recipe to invoke the git::windows recipe. This did not work because the windows recipe is incorrectly looking at ['windows']['url'] instead of ['git']['url'], and similarly for the other attributes.

I worked around this by directly calling the git_client resource with the correct attributes. This at least successfully installed the software.

However, where is a further issue wherein installing 64-bit git is not correctly supported. The path variable is updated to point to the 32 bit install location because Program Files (x86) is used any time its exists, regardless of the bit-ness of the version being installed.

Rather than just enumerating these issues, I am considering submitting a PR but I am not quite sure what would be considered the right solution to some of this. In particular for the first problem, given my choice, I would get rid of the windows recipe all together and simply update the package recipe to invoke the git_client resource for windows just as it does for mac. But maybe I am missing something there?

build-essential recipe not included in execution when git:source is included in a wrapper cookbook

Cookbook version

4.4.1

Chef-client version

12.9.38 & 12.6.0

Platform Details

CentOS 6.7

Scenario:

Wrapper cookbook that include git::source

Steps to Reproduce:

Create a wrapper cookbook that has more than 1 cookbook dependent on 'build-essential'

Expected Result:

Compilation fails because 'cc' cannot be found.

Actual Result:

https://gist.github.com/Sauraus/d7f97bc674b472aa9abb058bcfc12e45#file-git-source-compilation-error-L77

Take note in the above log, the entire call to 'build-essential' as defined here: https://github.com/chef-cookbooks/git/blob/master/libraries/provider_git_client_source.rb#L10 is missing from the log. It looks like the chef-client decided to not execute the 'build-essential' recipe at that point because most likely it is being included in another recipe further down the chain.

Git is building from source instead of from package

Not sure why, but version 4.2.2 installs git from package on our CentOS servers (as desired), but upgrading to latest version causes git to be compiled from source.
A lot of cookbooks rely on this one (by calling include_recipe 'git'), and I can't seem to find a way to instruct installation from package, since both providers... provide with the same configuration

Add core reviewer

Hi,

This project is really interesting and used by many chef users. Seems this coobkook needs some changes about chefspec, dead links, etc...
Is it possible to add core reviewers or someone that can validate and merge pull requests?

Regards

git 6.1.0 seems to be broken with latest chef client?

Cookbook version

6.1.0

Chef-client version

chef_13.1.31

Platform Details

debian 8.8.

Scenario:

just trying to run chef

Steps to Reproduce:

probably just deploy 6.1.0 as a cookbook and thats it

 Recipe Compile Error in /var/chef/cache/cookbooks/git/libraries/z_provider_mapping.rb
 ================================================================================
 
 NoMethodError
 -------------
 undefined method `set' for Chef::Platform:Class
 
 Cookbook Trace:
 ---------------
   /var/chef/cache/cookbooks/git/libraries/z_provider_mapping.rb:6:in `<top (required)>'
 
 Relevant File Content:
 ----------------------
 /var/chef/cache/cookbooks/git/libraries/z_provider_mapping.rb:
 
   1:  # provider mappings for Chef 11
   2:  
   3:  #########
   4:  # client
   5:  #########
   6>> Chef::Platform.set platform: :amazon, resource: :git_client, provider: Chef::Provider::GitClient::Package
   7:  Chef::Platform.set platform: :centos, resource: :git_client, provider: Chef::Provider::GitClient::Package
   8:  Chef::Platform.set platform: :debian, resource: :git_client, provider: Chef::Provider::GitClient::Package
   9:  Chef::Platform.set platform: :fedora, resource: :git_client, provider: Chef::Provider::GitClient::Package
  10:  Chef::Platform.set platform: :mac_os_x, resource: :git_client, provider: Chef::Provider::GitClient::Osx
  11:  Chef::Platform.set platform: :redhat, resource: :git_client, provider: Chef::Provider::GitClient::Package
  12:  Chef::Platform.set platform: :scientific, resource: :git_client, provider: Chef::Provider::GitClient::Package
  13:  Chef::Platform.set platform: :smartos, resource: :git_client, provider: Chef::Provider::GitClient::Package
  14:  Chef::Platform.set platform: :solaris2, resource: :git_client, provider: Chef::Provider::GitClient::Package
  15:  Chef::Platform.set platform: :suse, resource: :git_client, provider: Chef::Provider::GitClient::Package

Set version to 2.6.1, 1.9.5 installed

I have node.default['git']['version'] = '2.6.1' set, and I'm executing "recipe[git::source]"
I see that 2.6.1 is being built, but the git version on my machine is 1.9.5.

Any thoughts? I may be using this cookbook incorrectly.

$ vagrant provision

...
==> default: [2015-10-13T16:04:54+00:00] INFO: yum_package[perl-ExtUtils-MakeMaker] installing perl-ExtUtils-MakeMaker-6.68-3.el7 from base repository
==> default: [2015-10-13T16:05:08+00:00] INFO: yum_package[perl-ExtUtils-MakeMaker] installed perl-ExtUtils-MakeMaker at 6.68-3.el7
==> default: [2015-10-13T16:05:08+00:00] INFO: Processing yum_package[zlib-devel] action install (/var/chef/cookbooks/git/libraries/provider_git_client_source.rb line 35)
==> default: [2015-10-13T16:05:10+00:00] INFO: Processing remote_file[/var/chef/cache/git-2.6.1.tar.gz] action create (/var/chef/cookbooks/git/libraries/provider_git_client_source.rb line 39)
==> default: [2015-10-13T16:05:19+00:00] INFO: remote_file[/var/chef/cache/git-2.6.1.tar.gz] created file /var/chef/cache/git-2.6.1.tar.gz
==> default: [2015-10-13T16:05:19+00:00] INFO: remote_file[/var/chef/cache/git-2.6.1.tar.gz] updated file contents /var/chef/cache/git-2.6.1.tar.gz
==> default: [2015-10-13T16:05:19+00:00] INFO: remote_file[/var/chef/cache/git-2.6.1.tar.gz] mode changed to 644
==> default: [2015-10-13T16:05:20+00:00] INFO: Processing execute[Extracting and Building Git 2.6.1 from Source] action run (/var/chef/cookbooks/git/libraries/provider_git_client_source.rb line 47)
==> default: [2015-10-13T16:05:20+00:00] INFO: Processing execute[Guard resource] action run (dynamically defined)
==> default: [2015-10-13T16:05:21+00:00] INFO: Processing execute[Guard resource] action run (dynamically defined)
...

$ git --version

git version 1.9.5

which git

/usr/bin/local/git

NoMethodError: No resource or method named `action_install' for `Chef::Provider::GitClient'

Not sure if this needs to be fixed but we are getting this error with the new 4.2 version of the git cookbook when running on older versions of the chef client (v 11.18.x). Workaround that we tests are to downgrade to git 4.1 or upgrade the chef client. (Both work, we went with upgrading chef to 12.0.3).

NoMethodError: git_client[default] (git::default line 19) had an error: NoMethodError: No resource or method named `action_install' for `Chef::Provider::GitClient ""'

/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/dsl/recipe.rb:46:in `rescue in method_missing'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/dsl/recipe.rb:43:in `method_missing'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/provider.rb:121:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource.rb:648:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/runner.rb:49:in `run_action'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/runner.rb:81:in `block (2 levels) in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/runner.rb:81:in `each'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/runner.rb:81:in `block in converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection.rb:98:in `block in execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection/stepable_iterator.rb:116:in `call_iterator_block'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection/stepable_iterator.rb:85:in `step'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection/stepable_iterator.rb:104:in `iterate'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection/stepable_iterator.rb:55:in `each_with_index'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/resource_collection.rb:96:in `execute_each_resource'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/runner.rb:80:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/client.rb:345:in `converge'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/client.rb:431:in `do_run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/client.rb:213:in `block in run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/client.rb:207:in `fork'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/client.rb:207:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/application.rb:236:in `run_chef_client'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/application/client.rb:338:in `block in run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/application/client.rb:327:in `loop'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/application/client.rb:327:in `run_application'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/lib/chef/application.rb:55:in `run'
/opt/chef/embedded/lib/ruby/gems/1.9.1/gems/chef-11.18.0/bin/chef-client:26:in `'
/usr/bin/chef-client:23:in `load'
/usr/bin/chef-client:23:in `'

Error executing action `install` on resource 'git_client[default]'

We started receiving reports yesterday that the new git cookbook release from @someara does not work with some versions of the community MySQL cookbook, such as rackspace-cookbooks/platformstack#198. The reports all come with a similar stack trace:

Recipe: git::default
  * git_client[default] action install

    ================================================================================
    Error executing action `install` on resource 'git_client[default]'
    ================================================================================

    NoMethodError
    -------------
    undefined method `package_version' for Chef::Resource::AptPackage

    Cookbook Trace:
    ---------------
    /var/chef/cache/cookbooks/mysql/libraries/resource_mysql_service.rb:59:in `parsed_package_version'
    /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:16:in `block (2 levels) in <class:Package>'
    /var/chef/cache/cookbooks/git/libraries/provider_git_client_package.rb:14:in `block in <class:Package>'

    Resource Declaration:
    ---------------------
    # In /var/chef/cache/cookbooks/git/recipes/default.rb

     19: git_client 'default' do
     20:   action :install
     21: end

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/git/recipes/default.rb:19:in `from_file'

    git_client("default") do
      action [:install]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      declared_type :git_client
      cookbook_name "git"
      recipe_name "default"
    end

I can't figure out how git/libraries/provider_git_client_package.rb:16 is calling a method from mysql/libraries/resource_mysql_service.rb -- I don't see any require statements that would even expose these to each other, but there you have it. Maybe some Chef magic due to the LWRP classes being included/extended?

not pulling the latest git version

Cookbook version

[Version of the cookbook where you are encountering the issue]
9.0.0

Chef-client version

[Version of chef-client in your environment]
13

Platform Details

[Operating system distribution and release version. Cloud provider if running in the cloud]
Windows 2016

Scenario:

[What you are trying to achieve and you can't?]
Created a role to install git automatically using git cookbook but it's trying to download git version 2.8.1 with a url that does not seem to exist.

Steps to Reproduce:

[If you are filing an issue what are the things we need to do in order to repro your problem? How are you using this cookbook or any resources it includes?]
Use the cookbook in windows 2016 and use the attached windows.rb file.
windows.txt

Expected Result:

[What are you expecting to happen as the consequence of above reproduction steps?]
Git should be installed.

Actual Result:

[What actually happens after the reproduction steps? Include the error output or a link to a gist if possible.]
Error trying to download.

git LWRP never times out on failure

Attempting to sync a repository with an incorrect or missing SSH key causes the git LWRP to hang until manually killed:

    Compiled Resource:
    ------------------
    # Declared in /var/chef/cache/cookbooks/[...]/recipes/git.rb:23:in `from_file'

    git("/usr/local/bin") do
      action [:sync]
      retries 0
      retry_delay 2
      default_guard_interpreter :default
      destination "/usr/local/bin"
      enable_checkout true
      revision "HEAD"
      remote "origin"
      checkout_branch "master"
      declared_type :git
      cookbook_name "[...]"
      recipe_name "git"
      repository "[email protected]:[...].git"
    end

The attempt failed after a manual ^C, after 548s.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.