Heray-Was-Here
Server : Apache
System : Linux vps103298.mylogin.co 4.18.0-513.11.1.el8_9.x86_64 #1 SMP Wed Jan 17 02:00:40 EST 2024 x86_64
User : calvet ( 273824)
PHP Version : 7.4.33
Disable Function : NONE
Directory :  /proc/self/root/usr/local/lib/node_modules/@google/gemini-cli/dist/src/config/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Current File : //proc/self/root/usr/local/lib/node_modules/@google/gemini-cli/dist/src/config/auth.js
/**
 * @license
 * Copyright 2025 Google LLC
 * SPDX-License-Identifier: Apache-2.0
 */
import { AuthType } from '@google/gemini-cli-core';
import { loadEnvironment } from './config.js';
export const validateAuthMethod = (authMethod) => {
    loadEnvironment();
    if (authMethod === AuthType.LOGIN_WITH_GOOGLE) {
        return null;
    }
    if (authMethod === AuthType.USE_GEMINI) {
        if (!process.env.GEMINI_API_KEY) {
            return 'GEMINI_API_KEY environment variable not found. Add that to your .env and try again, no reload needed!';
        }
        return null;
    }
    if (authMethod === AuthType.USE_VERTEX_AI) {
        const hasVertexProjectLocationConfig = !!process.env.GOOGLE_CLOUD_PROJECT && !!process.env.GOOGLE_CLOUD_LOCATION;
        const hasGoogleApiKey = !!process.env.GOOGLE_API_KEY;
        if (!hasVertexProjectLocationConfig && !hasGoogleApiKey) {
            return ('Must specify GOOGLE_GENAI_USE_VERTEXAI=true and either:\n' +
                '• GOOGLE_CLOUD_PROJECT and GOOGLE_CLOUD_LOCATION environment variables.\n' +
                '• GOOGLE_API_KEY environment variable (if using express mode).\n' +
                'Update your .env and try again, no reload needed!');
        }
        return null;
    }
    return 'Invalid auth method selected.';
};
//# sourceMappingURL=auth.js.map

Hry