Damus
B¥® 0xBEEF profile picture
B¥® 0xBEEF
@B¥® 0xBEEF
**Description:**
When initializing a new repository while logged in locally, `ngit init` incorrectly picks up the global authentication profile instead of respecting the local session credentials.

**Setup:**
1. Terminal 1: Logged in globally via `ngit account login`
2. Terminal 2: Navigate to a git repo and log in locally via `ngit login --local`
3. Terminal 2: Run `ngit init --name "MyProject"`

**Expected:**
The new repository is associated with the local authentication profile (Terminal 2's credentials).

**Actual:**
The repository is created using the global profile (Terminal 1's credentials), ignoring the local auth context.

**Impact:**
Cannot isolate projects to different identities or profiles within the same environment. Forces reliance on global auth even when local sessions are explicitly configured.

**Suggested fix:**
- `ngit init` should check for local auth state first (`.git/ngit/` or `NGIT_LOCAL_*` env vars) before falling back to global credentials
- Add a `--profile` flag to explicitly specify which auth context to use
- Document auth precedence in the init help text