Stop hardcoding port

This commit is contained in:
2026-08-04 16:06:20 -03:00
parent 2cdd8c11a3
commit 6f7da8908b
6 changed files with 200 additions and 141 deletions
+2 -2
View File
@@ -17,7 +17,7 @@
- Gitea via HTTPS API, followed by an SSH or token-authenticated HTTPS push.
- Executes provider-specific connection to existing remote repositories:
- GitHub by resolving owner or URL input to `origin`.
- Gitea by resolving owner, base URL, and SSH/HTTPS transport or full URL input to `origin`.
- Gitea by preserving a full clone URL or retrieving exact SSH/HTTPS clone endpoints through the repository API.
- Synchronizes Gitea connections by inspecting ancestry, fast-forwarding the
side that is behind, or asking the user how to resolve divergent histories.
- Preserves local history on a backup branch before a user-confirmed local
@@ -34,7 +34,7 @@
- Requires `git` to be installed and available in `PATH`.
- Requires `gh` in `PATH` only for GitHub publication.
- Requires Gitea API token for Gitea publication.
- Runs Git subprocesses in non-interactive mode to avoid terminal credential prompt deadlocks.
- Temporarily suspends curses for network Git subprocesses so terminal authentication and credential helpers remain available.
## Data Model
+3 -3
View File
@@ -41,7 +41,7 @@
- `GITEA_URL` or `GITEA_BASE_URL` for instance URL default.
- `GITEA_OWNER` for default owner or organization.
- `GITEA_TOKEN` or `GITEA_ACCESS_TOKEN` for API token default.
- Git credential prompts are disabled inside `git-tui`; authentication issues are reported in the UI instead of opening an interactive terminal prompt.
- Network Git commands temporarily suspend curses and use the real terminal, allowing normal SSH passphrase, HTTPS credential, and credential-helper prompts.
## Existing Repository Without Remote Flow
@@ -51,8 +51,8 @@
- Continue without remote configuration.
- Quit.
- Connect existing remote flow:
- Gitea accepts `owner/name` or full clone URL input, and uses `GITEA_URL` or `GITEA_BASE_URL` defaults when a base URL is needed.
- For Gitea `owner/name` input, chooses SSH (the default) or HTTPS transport. SSH uses `GITEA_SSH_USER` (default `git`) and optional `GITEA_SSH_PORT`; HTTPS uses the configured Git credential helper.
- A full clone URL is used unchanged, preserving custom SSH users, aliases, hosts, and ports.
- For `owner/name`, uses the Gitea API to obtain the instance's exact `ssh_url` or `clone_url`; private repository lookup requires an API token.
- Configures remote `origin` to the selected repository URL.
- Inspects both histories and synchronizes automatically when one side can be fast-forwarded.
- If histories diverge, offers merge, replace-local-with-backup, and force-push-with-lease choices.