summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Stancu <stefan.stancu@cern.ch>2019-04-05 19:21:27 +0200
committerStefan Stancu <stefan.stancu@cern.ch>2019-04-05 19:21:27 +0200
commit096027bc4870407945261eecfe81706e32b1bfcd (patch)
tree69a4748066e3d0c3666d5783afc86b4e28353cd9
parent1f66e25c25cde2423917ee18c4704fff83b837d1 (diff)
downloadgitpython-096027bc4870407945261eecfe81706e32b1bfcd.tar.gz
Ensure git remote urls (multiple) are read from the correct git repo config
-rw-r--r--AUTHORS1
-rw-r--r--git/remote.py7
2 files changed, 4 insertions, 4 deletions
diff --git a/AUTHORS b/AUTHORS
index d2483dd4..24cf239b 100644
--- a/AUTHORS
+++ b/AUTHORS
@@ -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: