the receiving end does not support push options
Asked Answered
L

2

15

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:

Server

$ git --version  
git version 2.13.0

Client

$ 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

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.

Loralorain answered 30/7, 2017 at 13:55 Comment(0)
L
35

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#Documentation/git-config.txt-receiveadvertisePushOptions

You can enable it, in the server side, with

$ git config receive.advertisePushOptions true

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.

Loralorain answered 30/7, 2017 at 14:23 Comment(2)
Thanks for digging in to this! Sounds like the documentation needs updated.Bonnie
Updated deeplink: git-scm.com/docs/git-config#Documentation/…Maguire
P
-2

Just do not use push options.

No:

git push -o ci.skip

Yes:

git push
Potto answered 4/10, 2023 at 10:4 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.