我在服务器上由apache提供服务的目录中有一个Git存储库.我已经配置了WebDAV,它似乎正在运行.Litmus返回100%的成功.
我可以从远程主机克隆我的存储库,但在尝试推送http或https时,我收到以下错误:
错误:无法访问网址 https://git.example.com/repo/,返回代码22致命:git-http-push failed
任何的想法?
从github克隆一个给定的repo,然后在bitbucket上推送一个新的repo,我得到错误:
> fatal: remote part of refspec is not a valid name in :capabilities^{}
> fatal: The remote end hung up unexpectedly
Run Code Online (Sandbox Code Playgroud)
这个错误意味着什么 - 以及它导致了什么(我还是git的新手).
这是日志:
- clone from github:
$ git clone git://github.com/ASKBOT/askbot-devel.git test2
$ cd test2
- create a private git repo on bitbucket:
on the site GUI
- add remote:
$ git remote add bbtest2 https://shishani@bitbucket.org/shishani/test2.git
$ git remote -v
bbtest2 https://shishani@bitbucket.org/shishani/test2.git (fetch)
bbtest2 https://shishani@bitbucket.org/shishani/test2.git (push)
origin git://github.com/ASKBOT/askbot-devel.git (fetch)
origin git://github.com/ASKBOT/askbot-devel.git (push)
$ git branch -a
* …
Run Code Online (Sandbox Code Playgroud) 在我的远程盒子上,我初始化了一个裸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吗?