Skip to content

Commit 9bac64e

Browse files
author
Stefan Stancu
committed
Ensure git remote urls (multiple) are read from the correct git repo config
1 parent e639fc8 commit 9bac64e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

git/remote.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -544,8 +544,9 @@ def urls(self):
544544
except GitCommandError as ex:
545545
if any(msg in str(ex) for msg in ['correct access rights', 'cannot run ssh']):
546546
# If ssh is not setup to access this repository, see issue 694
547-
result = self.repo.git.config('--get', 'remote.%s.url' % self.name)
548-
yield result
547+
remote_details = self.repo.git.config('--get', 'remote.%s.url' % self.name)
548+
for line in remote_details.split('\n'):
549+
yield line
549550
else:
550551
raise ex
551552
else:

0 commit comments

Comments
 (0)