summaryrefslogtreecommitdiff
path: root/lib/puppet/provider
diff options
context:
space:
mode:
authorRamin K <ramin@snappytv.com>2013-04-17 20:36:43 +0000
committerRamin K <ramin@snappytv.com>2013-04-17 20:36:43 +0000
commitedbff6c99f8ce97e63dbab3556945ce0436879de (patch)
tree6a983c70acba1cfbefbb0ea38abb1908c309748e /lib/puppet/provider
parent2c81045b533150e8963384a2e812f57e9bfde134 (diff)
downloadpuppet-vcsrepo-edbff6c99f8ce97e63dbab3556945ce0436879de.tar.gz
puppet-vcsrepo-edbff6c99f8ce97e63dbab3556945ce0436879de.tar.bz2
add timeout to ssh sessions negotiation to prevent github problems (or any other remote connection issues) from blocking the Puppet run
Diffstat (limited to 'lib/puppet/provider')
-rw-r--r--lib/puppet/provider/vcsrepo/git.rb2
1 files changed, 1 insertions, 1 deletions
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)