fix(workspaces): fix invalid gemini args and initialize remote auth settings

This commit is contained in:
mkorwel
2026-03-18 12:16:59 -07:00
parent f3a2457af3
commit e23cbdc258
3 changed files with 18 additions and 2 deletions
@@ -225,6 +225,22 @@ and full builds) to a dedicated, high-performance GCP worker.
await provider.exec(`mkdir -p ~/.workspaces && echo ${githubToken} > ~/.workspaces/.gh_token && chmod 600 ~/.workspaces/.gh_token`);
}
// Initialize Remote Gemini Config with Auth
console.log('⚙️ Initializing remote Gemini configuration...');
const remoteConfigDir = `~/.workspaces/gemini-cli-config/.gemini`;
await provider.exec(`mkdir -p ${remoteConfigDir}`);
// Create a minimal settings.json on the remote to enable auth
const remoteSettings = {
general: {
authMethod: 'google_accounts'
}
};
const tmpSettingsPath = path.join(os.tmpdir(), `remote-settings-${Date.now()}.json`);
fs.writeFileSync(tmpSettingsPath, JSON.stringify(remoteSettings, null, 2));
await provider.sync(tmpSettingsPath, `${remoteConfigDir}/settings.json`);
fs.unlinkSync(tmpSettingsPath);
// Final Repo Sync
console.log(`🚀 Finalizing Remote Repository (${userFork})...`);
const repoUrl = `https://github.com/${userFork}.git`;