gitlab-ssh-proxy/update-keys
2016-06-19 03:35:36 -05:00

13 lines
305 B
Python
Executable File

#!/usr/bin/env python
import os
import sys
import subprocess
import config
keys = subprocess.check_output(["ssh", "git@{}".format(config.GITLAB_HOST), "-p", "{}".format(config.GITLAB_SSH_PORT), "cat", ".ssh/authorized_keys"])
with open("/home/git/.ssh/authorized_keys", "w") as ak:
ak.write(keys)