Puppet

木偶,git:無法複製

  • February 16, 2017

我的木偶大師的程式碼如下

vcsrepo {'/var/www/html':
               ensure => 'present',
               provider => 'git',
               source => "https://github.com/wikimedia/mediawiki.git",
               revision => 'REL1_23',
               }
       file {'/var/www/html/index.html':
               ensure => 'absent',
       }


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

而且我在執行 puppet 代理時無法執行 git commit,如下所示

puppet agent --debug --verbose --no-daemonize --onetime

而且我得到以下錯誤

Notice: /Stage[main]/Apache/Apache::Vhost[default]/File[/var/www/html]/ensure: created
Debug: /Stage[main]/Apache/Apache::Vhost[default]/File[/var/www/html]: The container Apache::Vhost[default] will propagate my refresh event
Debug: /File[/etc/httpd/conf.d/15-default.conf]/seluser: Found seluser default 'system_u' for /etc/httpd/conf.d/15-default.conf
Debug: /File[/etc/httpd/conf.d/15-default.conf]/selrole: Found selrole default 'object_r' for /etc/httpd/conf.d/15-default.conf
Debug: /File[/etc/httpd/conf.d/15-default.conf]/seltype: Found seltype default 'httpd_config_t' for /etc/httpd/conf.d/15-default.conf
Debug: /File[/etc/httpd/conf.d/15-default.conf]/selrange: Found selrange default 's0' for /etc/httpd/conf.d/15-default.conf
Debug: /Stage[main]/Mediawiki/File[/var/www/html/index.html]: Nothing to manage: no ensure and the resource doesn't exist
Debug: Executing '/usr/local/bin/git clone https://github.com/wikimedia/mediawiki.git /var/www/html'
Error: Execution of '/usr/local/bin/git clone https://github.com/wikimedia/mediawiki.git /var/www/html' returned 128: Cloning into '/var/www/html'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed
Error: /Stage[main]/Mediawiki/Vcsrepo[/var/www/html]/ensure: change from absent to present failed: Execution of '/usr/local/bin/git clone https://github.com/wikimedia/mediawiki.git /var/www/html' returned 128: Cloning into '/var/www/html'...
error: RPC failed; curl 18 transfer closed with outstanding read data remaining
fatal: The remote end hung up unexpectedly
fatal: early EOF
fatal: index-pack failed

奇怪的是

/Stage[main]/Apache/Apache::Vhost[default]/File[/var/www/html]/ensure: created

Error: /Stage[main]/Mediawiki/Vcsrepo[/var/www/html]/ensure: change from absent to present failed

我在 VirtualBox 中有我的 CentOS 代理,所以我認為我的虛擬機網路在下載大文件時逐漸變慢。

所以我打開了另一個選項卡並在終端中放置ping google.com並執行 git config --global http.postBuffer 524288000,然後開始結帳,一切順利。

添加它作為答案,希望它可以幫助與我執行相同環境的人。

謝謝你。

引用自:https://serverfault.com/questions/832683