接收端不支持推送选项 [英] the receiving end does not support push options

查看:339
本文介绍了接收端不支持推送选项的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

起初,我服务器的git版本是2.7.4,错误是准确的.但是,之后,我更新并用git版本确认了这一点:

At first my server's git version was 2.7.4 and the error was accurate. Afterwards, however, I updated and have confirmed this with git version:

服务器

$ git --version  
git version 2.13.0

客户

$ git --version  
git version 2.11.0 (Apple Git-81)

但是当我尝试推动这种情况发生时:

Yet when I try to push this happens:

$ git push --push-option=test  
fatal: the receiving end does not support push options  
fatal: The remote end hung up unexpectedly

即使根据文档,客户端版本和服务器版本均应支持:
2.11.0
2.13.0

Even though according to documentation this should be supported in both the client version and server version:
2.11.0
2.13.0

我什至在每个本地存储库上创建了两个新的本地存储库,然后尝试将它们从另一个本地存储库推送到另一个本地存储库(因此,它甚至不在其他服务器之间进行通信),但仍然出现该错误.我有什么要启用的吗?我找不到关于必须在文档上执行此操作的任何内容.

I even created two new local repositories on each and then tried to push to the other local repository from the other (so it isn't even communicating between a different server) yet I still get that error. Is there something I have to enable? I can't find anything about having to do that on the docs.

推荐答案

在搜索完代码之后,直到找到真正的 https://git-scm.com/docs/git-config#git-config -receiveadvertisePushOptions

After searching through code until I found the actual tests for push options I found out you have to enable a specific config for the repository which is conveniently disabled by default: https://git-scm.com/docs/git-config#git-config-receiveadvertisePushOptions

您可以通过以下方式启用它

You can enable it with

$ git config receive.advertisePushOptions true

git push的实际文档中,甚至据我所知,甚至在其他任何地方,也都没有方便地引用它.

This is also conveniently not referenced anywhere on the actual documentation for git push or even, as far as I can tell, anywhere else at all.

这篇关于接收端不支持推送选项的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆