# Gitea — вход в веб-панель admin (2026-11-10) - **Gitea работает в Docker-контейнере `gitea/gitea:latest`. Веб-сервер (`gitea web`) — PID из cgroup `docker-a4254b6029ab…`, слушает `0.0.0.0:3002`.** Снаружи хост видит процессы через `/proc` (10007=s6-supervise, 10010=gitea web), но это *внутри* контейнера. - **БД = SQLite** `/data/gitea/gitea.db`, в `git`-пользователе. Владелец файла критичен: должен быть `git:git`, иначе `gitea admin user change-password` падает с *"attempt to write a readonly database"*. - **Том БД на host:** `/var/lib/docker/volumes/44f0f135afac239f37eaf83b5c0097ed8c28061bdf3a1572707aee8e59ba9351/_data/gitea/`. Доступ к нему с host — через `sudo` (владелец xeon). - **Пароль от админ-панели ≠ Git-учённые данные.** Git-over-HTTP авторизуется по **персональному токену** (stored в `~/.git-credentials`, логин `admin`, пароль=`38419b52a9b4731d2bbbb243d5b2f105f62afb69`, host `127.0.0.1:3002`). Это отделено от веб-пароля admin. - **Надёжный сброс пароля admin:** 1. `docker stop gitea` → восстановить чистый бэкап в volume → `sudo rm -f gitea.db-wal gitea.db-shm`. 2. `docker start gitea` → `docker exec gitea chown git:git /data/gitea/gitea.db`. 3. `docker exec -u git gitea /usr/local/bin/gitea admin user change-password --username admin --password 'PASSWORD'` (нативно, хэш правильный). 4. Если Gitea требует *"You must change your password"* → `UPDATE user SET must_change_password=0 WHERE lower_name='admin'` (change-password ставит флаг=1). 5. Проверка веб-логом: POST `/user/login` (user_name+password) → `HTTP 303` → `Location: /` + `…Dashboard…`. Basic-auth через `/api/v1/user` может быть 401 из-за Host-header reverse-proxy — не надёжный индикатор. 6. ⚠️ `cp backup gitea.db` создаёт **новый inode**, а running-процесс держит старый *deleted*-inode → изменения не видны, пока не перезапустишь контейнер. Не делать `cp` на живом Gitea. --- # MEMORY.md — Durable Facts & Decisions ## Godot 4.7 — Stage 2 TileMapLayer collision (verified in headless) - **TileSet + TileMapLayer + polygon collision WORK in Godot 4.7 headless.** Verified: Fox drops onto a TileMapLayer tile and lands at the tile's polygon top edge (steps=13, vel.y=0, on_floor=true). - **Headless physics pattern:** run via `flatpak run org.godotengine.Godot --headless --path .` with `run/main_scene` set to a scene whose root is a `Node2D` script with `_ready()` + `_physics_process(delta)`. The engine's main loop drives physics (no need for `PhysicsServer2D.step()` / `integrate_forces`). - **Two headless gotchas for TileMapLayer:** 1. The moving body (Fox) must be a **direct child of the root Node2D**, NOT nested inside the `TileMapLayer`. A Fox nested inside TileMapLayer gets a null physics space (`body->get_space()` null → move_and_slide no-ops) and falls forever. 2. Fox must start **above** the tile polygon. TileSet polygon points are in tile-local coords with the tile's top edge at y=0 and downward positive. If Fox starts below y=32 it's already past the tile and falls away. Start at negative y. - **Per-tile collision polygon API (Godot 4.7):** - `TileSet.add_physics_layer()` (void, auto-indexed), `set_physics_layer_collision_layer(idx, mask)`, `set_physics_layer_collision_mask(idx, mask)`. - `TileMapLayer.get_cell_tile_data(Vector2i coords)` → `TileData` object (returns a live/mutable ref; edits persist — verified re-read = 1). - `td.set_collision_polygons_count(layer_index, count)`, `td.set_collision_polygon_points(layer_index, polygon_index, PackedVector2Array([...]))`. - `get_cell_tile_data` is the correct accessor; there is NO `set_tile_data` on the atlas source and no `TileSetCollisionObject2D`. - `add_child` is on `Node` (not `World2D`); `get_root()` returns a `Window`, not `Node2D`. Use a `Node2D` script as scene root for physics.