简体   繁体   English

git clone使用vcsrepo模块人偶引发错误

[英]git clone throws error with vcsrepo module puppet

I am following the pluralsight's tutorial for puppet fundamentals by Ben Piper. 我正在关注本·派珀(Ben Piper)撰写的关于木偶基本知识的多元教程。 When installing the "vcsrepo" module in agents and downloading the repository the puppet agent run hangs. 在代理中安装“ vcsrepo”模块并下载存储库时,puppet代理运行会挂起。

Below is the excerpt from my puppet master "init.pp" file 以下是我的人偶主文件“ init.pp”文件的节选

I changed my puppetmaster init.pp file to use the ssh instead.


  `file { '/home/vagrant/.ssh/id_rsa':
  ensure   =>  'present',
  }

  vcsrepo { '/var/www/html':
  ensure    => 'present',
  provider  => 'git',
  source    => 'git@github.com:wikimedia/mediawiki.git',
  user      => 'vagrant',
  revision  => 'REL1_23',
  require   => File['/home/vagrant/.ssh/id_rsa'],

  }

  file { '/var/www/html/index.html':
  ensure   =>  'absent',
 }

 File['/var/www/html/index.html'] -> Vcsrepo['/var/www/html']`

It now throws the below error 现在抛出以下错误

Notice: /Stage[main]/Linux/File[/info.txt]/content: content changed '{md5}dd4735ab73567a89caba62c6607e44b5' to '{md5}e30fa7cc7448a09071a0e4d33efa5986' Notice: /Stage[main]/Mediawiki/Vcsrepo[/var/www/html]/ensure: Creating repository from present Error: Execution of 'git clone git@github.com:wikimedia/mediawiki.git /var/www/html' returned 1: Error: /Stage[main]/Mediawiki/Vcsrepo[/var/www/html]/ensure: change from absent to present failed: Execution of 'git clone git@github.com:wikimedia/mediawiki.git /var/www/html' returned 1:

I have shared my system's public key in github account 我已经在github帐户中共享了系统的公钥

On Linux 在Linux上

Execute the following in the command line before executing the Git command: 在执行Git命令之前,请在命令行中执行以下操作:

export GIT_TRACE_PACKET=1
export GIT_TRACE=1
export GIT_CURL_VERBOSE=1

On Windows 在Windows上

Execute the following in the command line before executing the Git command: 在执行Git命令之前,请在命令行中执行以下操作:

set GIT_TRACE_PACKET=1
set GIT_TRACE=1
set GIT_CURL_VERBOSE=1

Cause 原因

Error code 56 indicates a curl receive error of CURLE_RECV_ERROR which means there was some issue that prevented the data from being received during the clone process. 错误代码56指示CURLE_RECV_ERROR的卷曲接收错误,这意味着存在一些问题,阻止了在克隆过程中接收数据。 Typically this is caused by a network setting, firewall, VPN client, or anti-virus that is terminating the connection before all data has been transferred. 通常,这是由网络设置,防火墙,VPN客户端或防病毒引起的,它们在传输所有数据之前就终止了连接。

Workaround 解决方法

Switch to using SSH to perform the clone. 切换到使用SSH执行克隆。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM