草庐IT

receivers

全部标签

git post-receive 无法正常工作

我有以下问题。我已经将“post-receive”更新为cd到某个目录,然后将repopull入以像这样部署它:#!/bin/bashcd/var/www/sitegitpulloriginmaster但是,每当我在本地机器上执行“gitpushoriginmaster”时,我都会得到以下信息:Countingobjects:5,done.Deltacompressionusingupto2threads.(etc..)remote:fatal:Notagitrepository:'.'然而,当我手动cd到/var/www/site并执行gitpulloriginmaster时,效果非

混帐克隆 : GnuTLS recv error (-9): A TLS packet with unexpected length was received

我正在尝试克隆一个git存储库,但在执行命令时收到以下错误:GnuTLSrecverror(-9):ATLSpacketwithunexpectedlengthwasreceived.我的客户端机器是Ubuntu14.04。 最佳答案 这是@IvanTernovtsiy所说的已知错误,但有解决方法从您的系统中删除当前的GITsudoapt-getpurgegit下载GITdebgit_1.9.1-1_amd64.deblink执行下载的DEB。 关于混帐克隆:GnuTLSrecverro

Git 'pre-receive' 钩子(Hook)和 'git-clang-format' 脚本可靠地拒绝违反代码风格约定的推送

让我们立即从我已经编写的pre-receive钩子(Hook)的片段开始:#!/bin/sh##format_bold='\033[1m'format_red='\033[31m'format_yellow='\033[33m'format_normal='\033[0m'##format_error="${format_bold}${format_red}%s${format_normal}"format_warning="${format_bold}${format_yellow}%s${format_normal}"##stdout(){format="${1}"shiftpri

git - git-receive-pack 是如何工作的?

我想知道如何git-receive-pack有效,因为我完全不知道它会发生什么。谁能揭开这个谜团? 最佳答案 Accordingtothemanpage:http://schacon.github.com/git/git-receive-pack.htmlThiscommandisusuallynotinvokeddirectlybytheenduser.TheUIfortheprotocolisonthegitsend-packside,andtheprogrampairismeanttobeusedtopushupdatesto

混帐 1.8 : it push error: dst ref refs/heads/master receives from more than one src

git1.8的另一个问题:$gitpusherror:dstrefrefs/heads/masterreceivesfrommorethanonesrc.error:failedtopushsomerefsto'gitosis@xxx.xx:xxx.git'建议?它在升级到1.8之前一直有效。$gitremote-vorigingitosis@xxx.xx:xxx.git(fetch)origingitosis@xxx.xx:xxx.git(push)谷歌搜索后我首先尝试了这个:$gitpushorigin:refs/heads/refs/heads/masterremote:warn

git - 如何在 git 上手动运行 hook post-receive?

我已经通过Git将一个网站推送到我的远程服务器但是出现了错误cannotrunpost-receive:Nosuchfileordirectory所以这些东西在服务器上,只是没有部署到我的/public文件夹。但是我确实有一个接收后文件,所以我不确定为什么找不到它。现在我认为我需要做的就是手动运行这个接收后Hook来进行checkout,尽管我不知道如何... 最佳答案 钩子(Hook)是一个可执行的shell脚本。如果您需要手动运行它,您可以从命令行执行它,尽管如果您的存储库有多个头(即您使用分支),构建预期的stdin输入会有些

git - 如何在 GitHub 上运行 post-receive hook

如何在GitHub中运行接收后Hook?。我知道有web-one但我想编写自定义脚本并且不想收到来自github的帖子。 最佳答案 post-receivehookofGithub实际上只是“WebHooks”,用于在存储库被推送到时与网络服务器通信。出于安全原因,您不能在GitHub服务器端运行任何东西。Whenapushismadetoyourrepository,we'llPOSTtoyourURLwithapayloadofJSON-encodeddataaboutthepushandthecommitsitcontaine

ruby - 混帐,Heroku : pre-receive hook declined

我正在设置一个git存储库并尝试将其链接到Heroku。当我运行命令时gitpushherokumaster我收到了Countingobjects:7,done.Deltacompressionusingupto2threads.Compressingobjects:100%(5/5),done.Writingobjects:100%(7/7),714bytes,done.Total7(delta1),reused0(delta0)----->Herokureceivingpush!Herokupushrejectedduetoanunrecognizederror.!We'vebee

Git-远程 : error: cannot run hooks/post-receive: No such file or directory

我得到错误:remote:error:cannotrunhooks/post-receive:Nosuchfileordirectory尝试推送到远程时。post-receivce文件存在于正确的位置(testnew.git/hooks)并包含:#!/bin/bash2exportGIT_DIR=/var/www/testnew/testnew/.git/exportGIT_WORK_TREE=/var/www/testnew/testnew/cd/var/www/testnew/testnew/echo"herewego..."gitfetchgitmergeorigin/maste

git - 编写一个 git post-receive hook 来处理特定的分支

这是我目前在公司服务器中的裸仓库中的钩子(Hook):gitpushoriginmaster这个钩子(Hook)推送到Assembla。我需要的是当有人将更改推送到我们服务器上的那个分支时,只推送一个分支(理想情况下是主分支),而忽略对其他分支的推送。是否可以从裸仓库中选择分支并仅将该分支推送到Assembla? 最佳答案 post-receivehook从stdin获取它的参数,格式如下:由于这些参数来自标准输入,而不是来自命令行参数,因此您需要使用read而不是$1$2$3。post-receivehook可以一次接收多个分支(