From 256786cc94ee7cfc2cdc063a6712bd4db3468c82 Mon Sep 17 00:00:00 2001 From: Erik Johnson Date: Tue, 24 Feb 2015 19:59:06 -0600 Subject: [PATCH] gitfs: Support ssh:// URLs for dulwich --- salt/fileserver/gitfs.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/salt/fileserver/gitfs.py b/salt/fileserver/gitfs.py index 6c6ac76b93..11cd9f604f 100644 --- a/salt/fileserver/gitfs.py +++ b/salt/fileserver/gitfs.py @@ -899,6 +899,9 @@ def _init_dulwich(rp_, repo_url, ssl_verify): successful, otherwise return None. Also return a boolean that will tell init() whether a new repo was initialized. ''' + if repo_url.startswith('ssh://'): + # Dulwich will throw an error if 'ssh' is used. + repo_url = 'git+' + repo_url new = False if not os.listdir(rp_): # Repo cachedir is empty, initialize a new repo there