svn_clear_credentials
Clear SVN credential cache to resolve authentication errors by removing stored login data from the system.
Instructions
Limpiar cache de credenciales SVN para resolver errores de autenticación
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- index.ts:545-564 (handler)MCP tool handler for svn_clear_credentials: calls SvnService.clearCredentials() and formats the response as markdown.async () => { try { const result = await getSvnService().clearCredentials(); const clearText = `🔐 **Cache de Credenciales Limpiado**\n\n` + `**Comando:** ${result.command}\n` + `**Tiempo de Ejecución:** ${formatDuration(result.executionTime || 0)}\n\n` + `**Resultado:**\n\`\`\`\n${result.data}\n\`\`\`\n\n` + `**Nota:** Esto puede ayudar a resolver errores como:\n` + `• E215004: No more credentials or we tried too many times\n` + `• Errores de autenticación por credenciales cacheadas incorrectamente`; return { content: [{ type: "text", text: clearText }], }; } catch (error: any) { return { content: [{ type: "text", text: `❌ **Error:** ${error.message}` }], }; }
- index.ts:542-566 (registration)Registers the svn_clear_credentials tool on the MCP server with empty input schema."svn_clear_credentials", "Limpiar cache de credenciales SVN para resolver errores de autenticación", {}, async () => { try { const result = await getSvnService().clearCredentials(); const clearText = `🔐 **Cache de Credenciales Limpiado**\n\n` + `**Comando:** ${result.command}\n` + `**Tiempo de Ejecución:** ${formatDuration(result.executionTime || 0)}\n\n` + `**Resultado:**\n\`\`\`\n${result.data}\n\`\`\`\n\n` + `**Nota:** Esto puede ayudar a resolver errores como:\n` + `• E215004: No more credentials or we tried too many times\n` + `• Errores de autenticación por credenciales cacheadas incorrectamente`; return { content: [{ type: "text", text: clearText }], }; } catch (error: any) { return { content: [{ type: "text", text: `❌ **Error:** ${error.message}` }], }; } } );
- tools/svn-service.ts:824-826 (helper)SvnService.clearCredentials() method delegates to the utility function.async clearCredentials(): Promise<SvnResponse> { return await clearSvnCredentials(this.config); }
- common/utils.ts:423-451 (helper)Core implementation: executes 'svn auth --remove' to clear SVN authentication cache, with fallback.export async function clearSvnCredentials(config: SvnConfig): Promise<SvnResponse> { try { // En sistemas Unix/Linux, SVN guarda credenciales en ~/.subversion/auth // En Windows, en %APPDATA%\Subversion\auth // Intentar limpiar usando el comando auth específico si está disponible // Primero intentar con el comando de limpieza estándar return await executeSvnCommand(config, ['auth', '--remove'], { noAuthCache: true }); } catch (error: any) { // Si el comando auth no está disponible, intentar alternativa try { // Como fallback, usar un comando que no guarde credenciales const response = await executeSvnCommand(config, ['info', '--non-interactive'], { noAuthCache: true }); return { success: true, data: 'Cache de credenciales limpiado (usando método alternativo)', command: 'clear-credentials', workingDirectory: config.workingDirectory! }; } catch (fallbackError: any) { return { success: false, error: `No se pudo limpiar el cache de credenciales: ${fallbackError.message}`, command: 'clear-credentials', workingDirectory: config.workingDirectory! }; } } }