相关疑难解决方法(0)

将提交提交到github时Git失败了

我将我在github上托管的git repo克隆到我的笔记本电脑上.我能够毫无问题地成功地将几个提交推送到github.但是,现在我收到以下错误:

Compressing objects: 100% (792/792), done.
error: RPC failed; result=22, HTTP code = 411
Writing objects: 100% (1148/1148), 18.79 MiB | 13.81 MiB/s, done.
Total 1148 (delta 356), reused 944 (delta 214)
Run Code Online (Sandbox Code Playgroud)

从这里,它只是挂起,我终于有机会CTRL+ C回终端.

git rpc github

127
推荐指数
3
解决办法
11万
查看次数

Git推送HTTP不激活远程钩子

在我的远程盒子上,我初始化了一个裸git存储库.在hooks目录中,我使用以下脚本初始化了post-receive,post-update和update hooks:

#!/bin/bash
echo $0 $@ >> /tmp/githooks.log
Run Code Online (Sandbox Code Playgroud)

在我的本地方框中,我克隆了存储库,添加了一个测试文件,提交了它并将更改推回到远程框中.

$ git clone https://remote/git/sandbox.git sandbox
$ cd sandbox
$ touch asdf
$ git add asdf
$ git commit -a
[master (root-commit) 37505de] zxcv
 0 files changed, 0 insertions(+), 0 deletions(-)
 create mode 100644 asdf
$ git push origin master
Fetching remote heads...
  refs/
  refs/heads/
  refs/tags/
updating 'refs/heads/master'
  from 0000000000000000000000000000000000000000
  to   37505de9c22b0aee84e0071190f4f58728770675
    sending 3 objects
    done
Updating remote server info
To https://remote/git/sandbox.git
 * [new branch]      master -> master
Run Code Online (Sandbox Code Playgroud)

但是,/ tmp/githooks.log在远程计算机上为空.但是,如果我在远程计算机上克隆存储库,则会成功调用挂钩.

git hook不能用于http-push吗?

git webdav

6
推荐指数
1
解决办法
5372
查看次数

标签 统计

git ×2

github ×1

rpc ×1

webdav ×1