import getpass


def get_auth(auth):
    """Ask for the user password if needed."""
    auth = tuple(auth.split(":", 1))
    if len(auth) < 2:
        user = auth[0]
        password = getpass.getpass("Please enter a password for %s: " % user)
        auth = (user, password)

    return auth