def get_credentials(env=None) -> tuple:
    path = None
    if env is None:
        env = os.environ.copy()
    if 'GCE_CREDENTIALS' in env:
        json_credentials = env['GCE_CREDENTIALS']
    elif 'GOOGLE_APPLICATION_CREDENTIALS' in env:
        path = env['GOOGLE_APPLICATION_CREDENTIALS']
        json_credentials = util.read_file(path)
    else:
        raise util.LauncherError(
            'MissingParameter', 'Either GCE_CREDENTIALS or GOOGLE_APPLICATION_CREDENTIALS must be set in env')

    return json_credentials, path