From edbff6c99f8ce97e63dbab3556945ce0436879de Mon Sep 17 00:00:00 2001 From: Ramin K Date: Wed, 17 Apr 2013 20:36:43 +0000 Subject: add timeout to ssh sessions negotiation to prevent github problems (or any other remote connection issues) from blocking the Puppet run --- lib/puppet/provider/vcsrepo/git.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib') diff --git a/lib/puppet/provider/vcsrepo/git.rb b/lib/puppet/provider/vcsrepo/git.rb index 6f979cb..76fa315 100644 --- a/lib/puppet/provider/vcsrepo/git.rb +++ b/lib/puppet/provider/vcsrepo/git.rb @@ -293,7 +293,7 @@ Puppet::Type.type(:vcsrepo).provide(:git, :parent => Puppet::Provider::Vcsrepo) if @resource.value(:identity) Tempfile.open('git-helper') do |f| f.puts '#!/bin/sh' - f.puts "exec ssh -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -i #{@resource.value(:identity)} $*" + f.puts "exec ssh -oStrictHostKeyChecking=no -oPasswordAuthentication=no -oKbdInteractiveAuthentication=no -oChallengeResponseAuthentication=no -oConnectTimeout=120 -i #{@resource.value(:identity)} $*" f.close FileUtils.chmod(0755, f.path) -- cgit v1.2.3