add timeout to ssh sessions negotiation to prevent github problems (or any other...
authorRamin K <ramin@snappytv.com>
Wed, 17 Apr 2013 20:36:43 +0000 (20:36 +0000)
committerRamin K <ramin@snappytv.com>
Wed, 17 Apr 2013 20:36:43 +0000 (20:36 +0000)
lib/puppet/provider/vcsrepo/git.rb

index 6f979cb..76fa315 100644 (file)
@@ -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)