summaryrefslogtreecommitdiff
path: root/git
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 /git
parent1f66e25c25cde2423917ee18c4704fff83b837d1 (diff)
downloadgitpython-096027bc4870407945261eecfe81706e32b1bfcd.tar.gz
Ensure git remote urls (multiple) are read from the correct git repo config
Diffstat (limited to 'git')
-rw-r--r--git/remote.py7
1 files changed, 3 insertions, 4 deletions
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: