feat(orchestration): Add Git credentials and remotes documentation

New files:
- GIT-CREDENTIALS-CONFIG.md: Complete credentials reference for Gitea/GitHub
- SIMCO-GIT-REMOTES.md: Directive for remote repository operations

Updates:
- _INDEX.md v2.6.0: Add Git Remotes section and aliases
- ALIASES.yml v2.6.0: Add @GIT_REMOTES, @GIT_CREDENTIALS

Key information documented:
- Gitea server: 72.60.226.4:3000
- Gitea credentials: rckrdmrd + token
- GitHub (gamilit only): SSH key auth
- Troubleshooting guides

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
rckrdmrd 2026-01-07 04:52:40 -06:00
parent cb4c0681d3
commit 41497a731f
4 changed files with 508 additions and 7 deletions

View File

@ -0,0 +1,241 @@
---
version: "1.0.0"
fecha: "2026-01-07"
tipo: directiva
categoria: operaciones
autor: "Claude Code (Opus 4.5)"
tags: [git, remotes, push, pull, gitea, operaciones]
aplica_a: [agentes, subagentes]
---
# SIMCO-GIT-REMOTES: Operaciones con Repositorios Remotos
## Propósito
Define el protocolo para operaciones git con repositorios remotos. **OBLIGATORIO** consultar antes de cualquier operación push/pull/clone.
---
## 1. Regla Principal
```yaml
REGLA_SERVIDORES:
gitea:
aplica_a: "TODOS los proyectos EXCEPTO gamilit"
servidor: "72.60.226.4:3000"
credenciales: "~/.git-credentials (token)"
github:
aplica_a: "SOLO gamilit"
servidor: "github.com"
credenciales: "SSH key (~/.ssh/id_ed25519)"
```
---
## 2. Antes de Operaciones Remotas
### 2.1 Checklist Pre-Operación
```yaml
VERIFICAR:
- [ ] Identificar si es gamilit (GitHub) u otro proyecto (Gitea)
- [ ] Verificar que credenciales estén configuradas
- [ ] Confirmar que el repositorio remoto existe
- [ ] Verificar rama actual y estado de cambios
```
### 2.2 Verificar Credenciales Gitea
```bash
# Verificar credential helper
git config --global credential.helper
# Debe retornar: store
# Si no está configurado:
git config --global credential.helper store
echo "http://rckrdmrd:a87cf9ba455874ebc712652d51344cb5417098fe@72.60.226.4:3000" > ~/.git-credentials
chmod 600 ~/.git-credentials
```
### 2.3 Verificar SSH para GitHub (solo gamilit)
```bash
ssh -T git@github.com
# Debe retornar: Hi rckrdmrd! You've successfully authenticated...
```
---
## 3. Credenciales de Referencia
### 3.1 Gitea (Proyectos Internos)
| Campo | Valor |
|-------|-------|
| Servidor | `72.60.226.4:3000` |
| Usuario | `rckrdmrd` |
| Password | `AfcItz2391,.` |
| Token Admin | `a87cf9ba455874ebc712652d51344cb5417098fe` |
| URL Base | `http://72.60.226.4:3000/rckrdmrd/` |
### 3.2 GitHub (Solo Gamilit)
| Campo | Valor |
|-------|-------|
| Servidor | `github.com` |
| Repositorio | `rckrdmrd/gamilit-workspace` |
| Auth | SSH Key |
---
## 4. Operaciones por Tipo de Proyecto
### 4.1 Proyectos Gitea (Mayoría)
```bash
# Clone
git clone http://72.60.226.4:3000/rckrdmrd/[PROYECTO].git
# Push (credenciales automáticas del store)
git push origin [RAMA]
# Pull
git pull origin [RAMA]
# Agregar remote
git remote add origin http://72.60.226.4:3000/rckrdmrd/[PROYECTO].git
```
### 4.2 Proyecto Gamilit (GitHub)
```bash
# Clone
git clone git@github.com:rckrdmrd/gamilit-workspace.git
# Push
git push origin [RAMA]
# Pull
git pull origin [RAMA]
# El remote ya está configurado como submodule
```
---
## 5. Crear Nuevo Repositorio en Gitea
### 5.1 Via API (Recomendado)
```bash
GITEA_TOKEN="a87cf9ba455874ebc712652d51344cb5417098fe"
REPO_NAME="nombre-repositorio"
# Crear repositorio principal
curl -X POST "http://72.60.226.4:3000/api/v1/user/repos" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${REPO_NAME}\", \"private\": false, \"description\": \"Descripción del proyecto\"}"
```
### 5.2 Crear Subrepositorios
```bash
# Para proyecto con subrepos (ej: michangarrito)
for SUBREPO in backend frontend database; do
curl -X POST "http://72.60.226.4:3000/api/v1/user/repos" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${REPO_NAME}-${SUBREPO}\", \"private\": false}"
done
```
---
## 6. Troubleshooting Rápido
### 6.1 Authentication Failed
```bash
# Reconfigurar credenciales
git config --global credential.helper store
echo "http://rckrdmrd:a87cf9ba455874ebc712652d51344cb5417098fe@72.60.226.4:3000" > ~/.git-credentials
chmod 600 ~/.git-credentials
# Reintentar operación
git push origin [RAMA]
```
### 6.2 Repository Not Found
```bash
# Verificar existencia
curl -s -H "Authorization: token a87cf9ba455874ebc712652d51344cb5417098fe" \
"http://72.60.226.4:3000/api/v1/repos/rckrdmrd/[PROYECTO]" | jq .name
# Si no existe, crear (ver sección 5)
```
### 6.3 Permission Denied (SSH - gamilit)
```bash
# Verificar key
ssh-add -l
# Si no hay keys, agregar
ssh-add ~/.ssh/id_ed25519
# Verificar conexión
ssh -T git@github.com
```
---
## 7. Matriz de Decisión
```
¿Qué proyecto es?
├─ gamilit ──────────────────────> Usar GitHub (SSH)
│ git@github.com:rckrdmrd/gamilit-workspace.git
└─ Cualquier otro proyecto ──────> Usar Gitea (HTTP + Token)
http://72.60.226.4:3000/rckrdmrd/[PROYECTO].git
```
---
## 8. Referencias
- `@GIT_CREDENTIALS`: orchestration/referencias/GIT-CREDENTIALS-CONFIG.md
- `@SUBREPOSITORIOS`: SUBREPOSITORIOS.md
- `@ESTRUCTURA_REPOS`: orchestration/directivas/simco/SIMCO-ESTRUCTURA-REPOS.md
---
## 9. Ejemplo de Flujo Completo
```yaml
FLUJO_PUSH_PROYECTO:
paso_1_identificar:
proyecto: "michangarrito"
servidor: "Gitea (no es gamilit)"
paso_2_verificar_credenciales:
comando: "git config --global credential.helper"
esperado: "store"
si_falla: "Configurar credential store"
paso_3_verificar_remote:
comando: "git remote -v"
esperado: "origin http://72.60.226.4:3000/rckrdmrd/michangarrito.git"
paso_4_ejecutar:
comando: "git push origin master"
resultado: "Push exitoso"
```
---
*SIMCO v1.0 - Single Instruction Matrix by Context and Operation*

View File

@ -2,9 +2,9 @@
**Single Instruction Matrix by Context and Operation**
**Version:** 2.5.0
**Version:** 2.6.0
**Fecha:** 2026-01-07
**Extension:** CCA + CAPVED + Niveles Jerarquicos + Economia de Tokens + Git + Escalamiento + Context Engineering + Subagentes
**Extension:** CCA + CAPVED + Niveles Jerarquicos + Economia de Tokens + Git + Escalamiento + Context Engineering + Subagentes + Git Remotes
---
@ -70,6 +70,7 @@ core/
│ │ │
│ │ │ # === GIT Y GOBERNANZA ===
│ │ ├── SIMCO-GIT.md # Control de versiones y commits
│ │ ├── SIMCO-GIT-REMOTES.md # Operaciones con repositorios remotos (push/pull/clone)
│ │ ├── SIMCO-ESCALAMIENTO.md # Escalamiento a Product Owner
│ │ │
│ │ │ # === SUBAGENTES Y ECONOMIA DE TOKENS (NUEVO) ===
@ -245,6 +246,7 @@ Antes de actuar, ejecuta el protocolo CCA (Carga de Contexto Automatica)."
| **Subagente** | `SIMCO-SUBAGENTE.md` | Protocolo cuando RECIBES delegacion |
| **CCA-Subagente** | `SIMCO-CCA-SUBAGENTE.md` | CCA ligero para subagentes |
| **Control Tokens** | `SIMCO-CONTROL-TOKENS.md` | Gestionar limites de tokens |
| **Git Remotes** | `SIMCO-GIT-REMOTES.md` | Operaciones push/pull/clone con servidores remotos |
| **Alineacion** | `SIMCO-ALINEACION.md` | Validar alineacion entre capas (DDL↔Entity↔DTO) |
| **Decision** | `SIMCO-DECISION-MATRIZ.md` | Clarificar que directiva ejecutar |
@ -317,6 +319,10 @@ Antes de actuar, ejecuta el protocolo CCA (Carga de Contexto Automatica)."
@CHK_DELEGACION: orchestration/checklists/CHECKLIST-PRE-DELEGACION.md
@PERFILES_COMPACT: orchestration/agents/perfiles/compact/
# GIT Y REPOSITORIOS REMOTOS (NUEVO)
@GIT_REMOTES: orchestration/directivas/simco/SIMCO-GIT-REMOTES.md
@GIT_CREDENTIALS: orchestration/referencias/GIT-CREDENTIALS-CONFIG.md
# TEMPLATES DE CONTEXTO
@CTX_STANDALONE: core/orchestration/templates/CONTEXTO-NIVEL-STANDALONE.md
@CTX_SUITE: core/orchestration/templates/CONTEXTO-NIVEL-SUITE.md
@ -353,6 +359,7 @@ Antes de actuar, ejecuta el protocolo CCA (Carga de Contexto Automatica)."
## CHANGELOG
- **v2.6.0** (2026-01-07): Git Remotes y Credenciales (SIMCO-GIT-REMOTES, GIT-CREDENTIALS-CONFIG)
- **v2.5.0** (2026-01-07): Subagentes y Economia de Tokens (SIMCO-SUBAGENTE, SIMCO-CCA-SUBAGENTE, SIMCO-CONTROL-TOKENS, perfiles compactos, templates escalonados)
- **v2.4.0** (2026-01-03): Agregado Context Engineering (SIMCO-CONTEXT-ENGINEERING.md, templates de herencia y recovery)
- **v2.3.0** (2025-12-12): Git y Escalamiento (SIMCO-GIT, SIMCO-ESCALAMIENTO)
@ -362,4 +369,4 @@ Antes de actuar, ejecuta el protocolo CCA (Carga de Contexto Automatica)."
---
**Version:** 2.5.0 | **Sistema:** SIMCO + CAPVED + Context Engineering + Economia Tokens | **Mantenido por:** Tech Lead
**Version:** 2.6.0 | **Sistema:** SIMCO + CAPVED + Context Engineering + Economia Tokens + Git Remotes | **Mantenido por:** Tech Lead

View File

@ -12,8 +12,8 @@
#
# ═══════════════════════════════════════════════════════════════════════════════
version: "2.5.0"
fecha_actualizacion: "2026-01-04"
version: "2.6.0"
fecha_actualizacion: "2026-01-07"
# ─────────────────────────────────────────────────────────────────────────────────
# CICLO DE VIDA Y BOOTSTRAP
@ -105,6 +105,8 @@ arquitectura:
gobernanza:
"@GIT": "directivas/simco/SIMCO-GIT.md"
"@GIT_REMOTES": "directivas/simco/SIMCO-GIT-REMOTES.md"
"@GIT_CREDENTIALS": "referencias/GIT-CREDENTIALS-CONFIG.md"
"@ESCALAMIENTO": "directivas/simco/SIMCO-ESCALAMIENTO.md"
# ─────────────────────────────────────────────────────────────────────────────────
@ -300,9 +302,12 @@ proyecto_local:
# ═══════════════════════════════════════════════════════════════════════════════
metadata:
total_aliases: 165+
ultima_actualizacion: "2026-01-04"
total_aliases: 170+
ultima_actualizacion: "2026-01-07"
mantenido_por: "Tech-Leader"
novedades_v2_6:
- "@GIT_REMOTES - Directiva para operaciones con repositorios remotos"
- "@GIT_CREDENTIALS - Configuracion de credenciales Git (Gitea/GitHub)"
novedades_v2_5:
- "@PERFIL_PRODUCTION_MANAGER - Gestion de ambientes productivos"
- "@PERFIL_SECRETS_MANAGER - Gestion de secretos y credenciales"

View File

@ -0,0 +1,248 @@
---
version: "1.0.0"
fecha: "2026-01-07"
tipo: referencia
categoria: infraestructura
autor: "Claude Code (Opus 4.5)"
tags: [git, credentials, gitea, repositorios, infraestructura]
---
# Configuración de Credenciales Git
## Resumen
Este documento define la configuración de credenciales para acceso a repositorios remotos del workspace. **TODOS** los proyectos excepto `gamilit` utilizan el servidor Gitea interno.
---
## 1. Servidor Gitea (Proyectos Internos)
### 1.1 Datos del Servidor
| Campo | Valor |
|-------|-------|
| **Servidor** | 72.60.226.4 |
| **Puerto Web** | 3000 |
| **Puerto SSH** | 22 |
| **URL Base HTTP** | `http://72.60.226.4:3000/rckrdmrd/` |
| **URL Base SSH** | `git@gitea-server:rckrdmrd/` |
| **Usuario** | `rckrdmrd` |
### 1.2 Credenciales de Acceso
```yaml
GITEA_CREDENTIALS:
servidor: "72.60.226.4:3000"
usuario: "rckrdmrd"
password: "AfcItz2391,."
token_admin: "a87cf9ba455874ebc712652d51344cb5417098fe"
token_descripcion: "Token administrativo para operaciones API y git"
```
### 1.3 Archivo de Credenciales Local
Las credenciales están almacenadas en:
```bash
# Ubicación
~/.git-credentials
# Contenido (formato git credential store)
http://rckrdmrd:a87cf9ba455874ebc712652d51344cb5417098fe@72.60.226.4:3000
```
### 1.4 Configuración Git Global
```bash
# Habilitar credential store
git config --global credential.helper store
# Verificar configuración
git config --global --get credential.helper
# Output esperado: store
```
---
## 2. GitHub (Proyecto Gamilit)
### 2.1 Datos del Servidor
| Campo | Valor |
|-------|-------|
| **Servidor** | github.com |
| **URL SSH** | `git@github.com:rckrdmrd/gamilit-workspace.git` |
| **Método Auth** | SSH Key |
### 2.2 Configuración SSH
```bash
# ~/.ssh/config
Host github.com
HostName github.com
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
```
---
## 3. Configuración SSH para Gitea
```bash
# ~/.ssh/config
Host gitea-server
HostName 72.60.226.4
Port 22
User git
IdentityFile ~/.ssh/id_ed25519
IdentitiesOnly yes
```
---
## 4. Matriz de Proyectos y Servidores
### 4.1 Proyectos en Gitea (Credenciales Internas)
| Proyecto | Remote URL |
|----------|------------|
| workspace-v1 | `http://72.60.226.4:3000/rckrdmrd/workspace-v1.git` |
| erp-suite | `http://72.60.226.4:3000/rckrdmrd/erp-suite.git` |
| erp-core | `http://72.60.226.4:3000/rckrdmrd/erp-core.git` |
| erp-construccion | `http://72.60.226.4:3000/rckrdmrd/erp-construccion.git` |
| erp-clinicas | `http://72.60.226.4:3000/rckrdmrd/erp-clinicas.git` |
| erp-retail | `http://72.60.226.4:3000/rckrdmrd/erp-retail.git` |
| erp-mecanicas-diesel | `http://72.60.226.4:3000/rckrdmrd/erp-mecanicas-diesel.git` |
| erp-vidrio-templado | `http://72.60.226.4:3000/rckrdmrd/erp-vidrio-templado.git` |
| trading-platform | `http://72.60.226.4:3000/rckrdmrd/trading-platform.git` |
| betting-analytics | `http://72.60.226.4:3000/rckrdmrd/betting-analytics.git` |
| inmobiliaria-analytics | `http://72.60.226.4:3000/rckrdmrd/inmobiliaria-analytics.git` |
| platform_marketing_content | `http://72.60.226.4:3000/rckrdmrd/platform_marketing_content.git` |
| michangarrito | `http://72.60.226.4:3000/rckrdmrd/michangarrito.git` |
| template-saas | `http://72.60.226.4:3000/rckrdmrd/template-saas.git` |
| clinica-dental | `http://72.60.226.4:3000/rckrdmrd/clinica-dental.git` |
| clinica-veterinaria | `http://72.60.226.4:3000/rckrdmrd/clinica-veterinaria.git` |
### 4.2 Proyectos en GitHub (SSH Key)
| Proyecto | Remote URL |
|----------|------------|
| gamilit | `git@github.com:rckrdmrd/gamilit-workspace.git` |
---
## 5. Operaciones Comunes
### 5.1 Verificar Credenciales
```bash
# Verificar acceso a Gitea
curl -s -H "Authorization: token a87cf9ba455874ebc712652d51344cb5417098fe" \
http://72.60.226.4:3000/api/v1/user | jq .login
# Verificar acceso SSH a GitHub
ssh -T git@github.com
```
### 5.2 Crear Repositorio en Gitea (API)
```bash
GITEA_TOKEN="a87cf9ba455874ebc712652d51344cb5417098fe"
REPO_NAME="nuevo-proyecto"
curl -X POST "http://72.60.226.4:3000/api/v1/user/repos" \
-H "Authorization: token ${GITEA_TOKEN}" \
-H "Content-Type: application/json" \
-d "{\"name\": \"${REPO_NAME}\", \"private\": false}"
```
### 5.3 Clonar Proyecto
```bash
# Proyecto Gitea (credenciales automáticas)
git clone http://72.60.226.4:3000/rckrdmrd/[PROYECTO].git
# Proyecto GitHub (SSH)
git clone git@github.com:rckrdmrd/gamilit-workspace.git
```
### 5.4 Push a Repositorio
```bash
# Gitea (credenciales del store)
git push origin main
# Si las credenciales no están configuradas, configurar primero:
git config --global credential.helper store
echo "http://rckrdmrd:a87cf9ba455874ebc712652d51344cb5417098fe@72.60.226.4:3000" > ~/.git-credentials
chmod 600 ~/.git-credentials
```
---
## 6. Troubleshooting
### 6.1 Error: Authentication Failed
```bash
# Verificar que el credential store esté configurado
git config --global credential.helper
# Si está vacío, configurar:
git config --global credential.helper store
# Recrear archivo de credenciales
echo "http://rckrdmrd:a87cf9ba455874ebc712652d51344cb5417098fe@72.60.226.4:3000" > ~/.git-credentials
chmod 600 ~/.git-credentials
```
### 6.2 Error: Permission Denied (SSH)
```bash
# Verificar configuración SSH
cat ~/.ssh/config
# Verificar permisos de key
chmod 600 ~/.ssh/id_ed25519
chmod 644 ~/.ssh/id_ed25519.pub
# Probar conexión
ssh -vT git@gitea-server
ssh -vT git@github.com
```
### 6.3 Error: Repository Not Found
```bash
# Verificar que el repositorio exista
curl -s -H "Authorization: token a87cf9ba455874ebc712652d51344cb5417098fe" \
http://72.60.226.4:3000/api/v1/repos/rckrdmrd/[PROYECTO]
# Si no existe, crear:
curl -X POST "http://72.60.226.4:3000/api/v1/user/repos" \
-H "Authorization: token a87cf9ba455874ebc712652d51344cb5417098fe" \
-H "Content-Type: application/json" \
-d '{"name": "[PROYECTO]", "private": false}'
```
---
## 7. Notas de Seguridad
1. **Token de Gitea**: El token tiene permisos administrativos. NO compartir públicamente.
2. **Archivo ~/.git-credentials**: Debe tener permisos 600 (solo lectura/escritura para el usuario).
3. **SSH Keys**: Las claves privadas nunca deben ser compartidas o expuestas.
4. **Rotación**: Se recomienda rotar el token de Gitea periódicamente.
---
## 8. Referencias
- `SUBREPOSITORIOS.md` - Lista completa de repositorios y estructura
- `orchestration/directivas/simco/SIMCO-ESTRUCTURA-REPOS.md` - Estructura de repositorios
- `scripts/create-gitea-repos-api.sh` - Script para crear repositorios
---
*Generado por NEXUS v4.0 - Sistema de Orquestación*