def ask_gerrit_username(server, ssh_port=29418):
    ui.info(ui.green, "Configuring gerrit ssh access ...")
    username = qisys.sh.username()
    if not username:
        username = qisys.interact.ask_string("Please enter your username")
        if not username:
            return
    ui.info("Checking gerrit connection with %s@%s:%i" %
            (username, server, ssh_port))
    if check_gerrit_connection(username, server, ssh_port=ssh_port):
        ui.info("Success")
        return username

    ui.warning("Could not connect to ssh using username", username)
    try_other = qisys.interact.ask_yes_no("Do you want to try with another username?")
    if not try_other:
        return

    username = qisys.interact.ask_string("Please enter your username")
    if not username:
        return

    if check_gerrit_connection(username, server, ssh_port=ssh_port):
        return username
Run a wizard to try to configure gerrit access
dataset/ETHPy150Open aldebaran/qibuild/python/qisrc/review.py/ask_gerrit_username