From 096027bc4870407945261eecfe81706e32b1bfcd Mon Sep 17 00:00:00 2001 From: Stefan Stancu Date: Fri, 5 Apr 2019 19:21:27 +0200 Subject: [PATCH] Ensure git remote urls (multiple) are read from the correct git repo config --- AUTHORS | 1 + git/remote.py | 7 +++---- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/AUTHORS b/AUTHORS index d2483dd42..24cf239b9 100644 --- a/AUTHORS +++ b/AUTHORS @@ -29,5 +29,6 @@ Contributors are: -Tim Swast -William Luc Ritchie -David Host +-Stefan Stancu Portions derived from other open source works and are clearly marked. diff --git a/git/remote.py b/git/remote.py index 8aec68e15..8c28e636e 100644 --- a/git/remote.py +++ b/git/remote.py @@ -544,10 +544,9 @@ def urls(self): except GitCommandError as ex: if any(msg in str(ex) for msg in ['correct access rights', 'cannot run ssh']): # If ssh is not setup to access this repository, see issue 694 - result = Git().execute( - ['git', 'config', '--get', 'remote.%s.url' % self.name] - ) - yield result + remote_details = self.repo.git.config('--get-all', 'remote.%s.url' % self.name) + for line in remote_details.split('\n'): + yield line else: raise ex else: