def user_and_project_from_git(self, options, arg0=None, arg1=None):
user, project = self.user_project_from_option(options, arg0, arg1)<EOL>if user and project:<EOL><INDENT>return user, project<EOL><DEDENT>try:<EOL><INDENT>remote = subprocess.check_output(<EOL>[<EOL>'<STR_LIT>', '<STR_LIT>', '<STR_LIT>',<EOL>'<STR_LIT>'.format(options.git_remote)<EOL>]<EOL>)<EOL><DEDENT>except subprocess.CalledProcessError:<EOL><INDENT>return None, None<EOL><DEDENT>except WindowsError:<EOL><INDENT>print("<STR_LIT>")<EOL>exit(<NUM_LIT:1>)<EOL><DEDENT>else:<EOL><INDENT>return self.user_project_from_remote(remote)<EOL><DEDENT>
Detects user and project from git.