diff options
author | Stefan Stancu <stefan.stancu@cern.ch> | 2019-04-05 19:21:27 +0200 |
---|---|---|
committer | Stefan Stancu <stefan.stancu@cern.ch> | 2019-04-05 19:21:27 +0200 |
commit | 096027bc4870407945261eecfe81706e32b1bfcd (patch) | |
tree | 69a4748066e3d0c3666d5783afc86b4e28353cd9 | |
parent | 1f66e25c25cde2423917ee18c4704fff83b837d1 (diff) | |
download | gitpython-096027bc4870407945261eecfe81706e32b1bfcd.tar.gz |
Ensure git remote urls (multiple) are read from the correct git repo config
-rw-r--r-- | AUTHORS | 1 | ||||
-rw-r--r-- | git/remote.py | 7 |
2 files changed, 4 insertions, 4 deletions
@@ -29,5 +29,6 @@ Contributors are: -Tim Swast <swast _at_ google.com> -William Luc Ritchie -David Host <hostdm _at_ outlook.com> +-Stefan Stancu <stefan.stancu _at_ gmail.com> Portions derived from other open source works and are clearly marked. diff --git a/git/remote.py b/git/remote.py index 8aec68e1..8c28e636 100644 --- a/git/remote.py +++ b/git/remote.py @@ -544,10 +544,9 @@ class Remote(LazyMixin, Iterable): 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: |