15 lines
357 B
Python
Executable File
15 lines
357 B
Python
Executable File
#!/usr/bin/env python
|
|
|
|
import os
|
|
import sys
|
|
import subprocess
|
|
|
|
import config
|
|
|
|
command = " ".join(sys.argv)
|
|
|
|
if 'SSH_ORIGINAL_COMMAND' in os.environ:
|
|
command = "SSH_ORIGINAL_COMMAND='" + os.environ['SSH_ORIGINAL_COMMAND'] + "' " + command
|
|
|
|
subprocess.call(["ssh", "git@{}".format(config.GITLAB_HOST), "-p", "{}".format(config.GITLAB_SSH_PORT), command])
|