code: def get_remote_url(self, remote='origin', cached=True):
          
          if hasattr(self.__class__, '_remote_url') and cached:
              url = self.__class__._remote_url
          else:
              r = self.get_remote(remote)
              try:
                  url = list(r.urls)[0]
              except GitCommandError as ex:
                  if 'correct access rights' in str(ex):
                      # If ssh is not setup to access this repository
                      cmd = ['git', 'config', '--get', 'remote.%s.url' % r.name]
                      url = Git().execute(cmd)
                  else:
                      raise ex
              except AttributeError:
                  url = None
              if url is not None and url.startswith('git@'):
                  domain = url.split('@')[1].split(':')[0]
                  path = url.split(':')[1]
                  url = "http://%s/%s" % (domain, path)
          self.__class__._remote_url = url
          return url
docs: Get a git remote URL for this instance.