code: def get_policies_from_git(self):
          
          fldr = mkdtemp()
          try:
              url = 'https://{token}:x-oauth-basic@{server}/{repo}'.format(**{
                  'token': self.dbconfig.get('git_auth_token', self.ns),
                  'server': self.dbconfig.get('git_server', self.ns),
                  'repo': self.dbconfig.get('git_repo', self.ns)
              })
  
              policies = {'GLOBAL': {}}
              if self.dbconfig.get('git_no_ssl_verify', self.ns, False):
                  os.environ['GIT_SSL_NO_VERIFY'] = '1'
  
              repo = Repo.clone_from(url, fldr)
              for obj in repo.head.commit.tree:
                  name, ext = os.path.splitext(obj.name)
  
                  # Read the standard policies
                  if ext == '.json':
                      policies['GLOBAL'][name] = obj.data_stream.read()
  
                  # Read any account role specific policies
                  if name == 'roles' and obj.type == 'tree':
                      for account in [x for x in obj.trees]:
                          for role in [x for x in account.trees]:
                              role_policies = {policy.name.replace('.json', ''): policy.data_stream.read() for policy in
                                               role.blobs if
                                               policy.name.endswith('.json')}
  
                              if account.name in policies:
                                  if role.name in policies[account.name]:
                                      policies[account.name][role.name] += role_policies
                                  else:
                                      policies[account.name][role.name] = role_policies
                              else:
                                  policies[account.name] = {
                                      role.name: role_policies
                                  }
  
              return policies
          finally:
              if os.path.exists(fldr) and os.path.isdir(fldr):
                  shutil.rmtree(fldr)
docs: Retrieve policies from the Git repo. Returns a dictionary containing all the roles and policies
  
          Returns:
              :obj:`dict` of `str`: `dict`