def remote_get(cwd, remote='origin', user=None, password=None, redact_auth=True, ignore_retcode=False):
 cwd = _expand_path(cwd, user)
 all_remotes = remotes(cwd, user=user, password=password, redact_auth=redact_auth, ignore_retcode=ignore_retcode)
 if (remote not in all_remotes):
  raise CommandExecutionError("Remote '{0}' not present in git checkout located at {1}".format(remote, cwd))
 return all_remotes[remote]

def remote_get ( cwd , remote = 'origin' , user = None , password = None , redact_auth = True , ignore_retcode = False ) : cwd = _expand_path ( cwd , user ) all_remotes = remotes ( cwd , user = user , password = password , redact_auth = redact_auth , ignore_retcode = ignore_retcode ) if ( remote not in all_remotes ) : raise CommandExecutionError ( "Remote '{0}' not present in git checkout located at {1}" . format ( remote , cwd ) ) return all_remotes [ remote ]
get the fetch and push url for a specific remote cwd the path to the git checkout remote : origin name of the remote to query user user under which to run the git command .