| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -536,10 +536,18 @@ def urls(self): | |||
| 536 | 536 | # and: http://stackoverflow.com/a/32991784/548792 | |
| 537 | 537 | # | |
| 538 | 538 | if 'Unknown subcommand: get-url' in str(ex): | |
| 539 | - remote_details = self.repo.git.remote("show", self.name) | ||
| 540 | - for line in remote_details.split('\n'): | ||
| 541 | - if ' Push URL:' in line: | ||
| 542 | - yield line.split(': ')[-1] | ||
| 539 | + try: | ||
| 540 | + remote_details = self.repo.git.remote("show", self.name) | ||
| 541 | + for line in remote_details.split('\n'): | ||
| 542 | + if ' Push URL:' in line: | ||
| 543 | + yield line.split(': ')[-1] | ||
| 544 | + except GitCommandError as ex: | ||
| 545 | + if any([msg in str(ex) for msg in ['correct access rights','cannot run ssh']]): | ||
| 546 | + # If ssh is not setup to access this repository, see issue 694 | ||
| 547 | + result = Git().execute(['git','config','--get','remote.%s.url' % self.name]) | ||
| 548 | + yield result | ||
| 549 | + else: | ||
| 550 | + raise ex | ||
| 543 | 551 | else: | |
| 544 | 552 | raise ex | |
| 545 | 553 | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments