Skip to content
Snippets Groups Projects
Commit f8c1df4650a3 authored by Dan Villiom Podlaski Christiansen's avatar Dan Villiom Podlaski Christiansen
Browse files

ssh: fix pushing or pulling from SSH with GIT_SSH_COMMAND set

Dulwich passes certain keyword arguments to SSHVendor which we do not
support, including `password`, `key_filename` and `ssh_command`.
Ignore them rather than die on unsupported arguments.
parent edd4ce4c580c
No related branches found
No related tags found
1 merge request!183ssh: fix pushing or pulling from SSH with GIT_SSH_COMMAND set
Pipeline #57736 passed
......@@ -19,7 +19,9 @@
"""
class _Vendor(SSHVendor):
def run_command(self, host, command, username=None, port=None):
def run_command(
self, host, command, username=None, port=None, **kwargs
):
assert isinstance(command, str)
command = command.encode(SSHGitClient.DEFAULT_ENCODING)
sshcmd = ui.config(b"ui", b"ssh", b"ssh")
......
......@@ -67,6 +67,14 @@
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
..but also try SSH with GIT_SSH_COMMAND, which we just ignore:
$ GIT_SSH_COMMAND="ignored" \
> hg clone git@git-server:/srv/repo.git repo-ssh-2
updating to branch default
0 files updated, 0 files merged, 0 files removed, 0 files unresolved
$ rm -rf repo-ssh-2
So, that went well; now push...
$ cd repo-ssh
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment