Skip to content

git push not working, when intercepted with SSH-MITM #131

@manfred-kaiser

Description

@manfred-kaiser

Hello @manfred-kaiser,

Your post about ssh-mitm around git audits was pretty helpful.
I was able to configure ssh-mitm to audit git clone commands to github remote repo from my local, using configs mentioned in this thread as well as in https://docs.ssh-mitm.at/user_guide/advanced-usage.html.
However, when trying to do writes on the same branch (tracking github remote branch), git push fails with error:

fatal: the remote end hung up unexpectedly

and on the ssh-mitm process, the output was

                    INFO     ℹ b72e07c7-b16d-4da6-b491-420063043d9c - session
                             started
                    INFO     got remote command: git-receive-pack '/user/foo.git'
Server data:
...
Client data:
...
[02/22/23 17:28:08] INFO     ℹ session b72e07c7-b16d-4da6-b491-420063043d9c closed

note: not seeing the remote command exit code, while I was expecting something like

remote command: git-receive-pack '/user/foo.git' exited with code: 0

Question:

  • is this expected that ssh-mitm does not work for git push?
  • why does git clone working but not git push? Is it because ssh-mitm implements some of the git protocol but not all?

Appreciate your help!

Originally posted by @hc-dev991 in #115 (comment)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions