clearml-agent/clearml_agent
Simon Gasse 9456e493ac Enable rewriting SSH URLs
ClearML Agent allows to force git cloning via SSH and also has a
setting to force a username. The relevant settings are:
agent.force_git_ssh_protocol: true
agent.force_git_ssh_user: "git"

However, forcing a specific username or port only worked so far if the
agent translated either from https->ssh or from ssh->https. A given
ssh URL was not rewritten.

This commit adds a helper function and includes it in `_set_ssh_url`
to allow rewriting ssh URLs with the username and/or port given in the
config `agent.force_git_ssh_user`.
If neither username nor port are forced in the config, the URL is not
touched.

This is somewhat related to issue #42.
Note that rewriting https->https is not covered in this commit.
2021-07-31 23:34:27 +03:00
..
backend_api Fix key/secret usage printout 2021-06-24 19:37:59 +03:00
backend_config Add printout when using key/secret from env vars 2021-06-02 21:15:48 +03:00
commands Fix auto mount SSH_AUTH_SOCK into docker (issue #45) 2021-07-11 09:44:49 +03:00
external Fix support for "-r requirements.txt" inside "installed packages" 2021-06-24 19:26:35 +03:00
glue Fix multiple k8s glue instances with pod limits 2021-07-15 10:28:43 +03:00
helper Enable rewriting SSH URLs 2021-07-31 23:34:27 +03:00
interface add space to help message 2021-04-27 13:50:44 +03:00
__init__.py Rename trains-agent -> clearml-agent 2020-12-22 21:21:29 +02:00
__main__.py initial clearml-agent v0.17.0 2020-12-22 23:00:57 +02:00
complete.py initial clearml-agent v0.17.0 2020-12-22 23:00:57 +02:00
config.py initial clearml-agent v0.17.0 2020-12-22 23:00:57 +02:00
definitions.py Fix auto mount SSH_AUTH_SOCK into docker (issue #45) 2021-07-11 09:44:49 +03:00
errors.py Rename trains-agent -> clearml-agent 2020-12-22 21:21:29 +02:00
session.py Use shared git cache between multiple agents on the same machine 2021-02-14 13:49:29 +02:00
version.py Fix multiple k8s glue instances with pod limits 2021-07-15 10:28:43 +03:00