update to support 413 refusal
This commit is contained in:
1 parent
5bb0d5e406
commit
5b1b2a7573
6 files changed
+290
-8
No files matched your search
@@ -7,6 +7,28 @@ Keeps a Unity project in step with its git remote.
|
||||
|
||||
If something can't be done safely (a conflict, no network, a failed push), it asks whether to **Quit Anyway** or **Stay Open**. Your work is always committed locally first, and an unpushed commit goes up the next time you close.
|
||||
|
||||
## Large pushes: SSH fallback for HTTP 413
|
||||
|
||||
If the server rejects an HTTPS push as too large (HTTP 413, such as Cloudflare's 100 MB upload limit), the same push is retried over SSH. The SSH address can be on a different host from the HTTPS one: `https://git.example.com/owner/repo.git` becomes `ssh://git@<SSH host>/owner/repo.git`.
|
||||
|
||||
Set it up in **Project Settings > Git Auto Sync** (or **Tools > Git Auto Sync > Settings...**):
|
||||
|
||||
- **SSH Host**: for example `ssh.example.com`. Leave blank to use the HTTPS remote's host.
|
||||
- **SSH User** (usually `git`) and **SSH Port** (22 unless your server uses another).
|
||||
- **Full SSH URL**: optional. Use it when the path differs, such as a server installed under a subpath.
|
||||
- **Test SSH Connection**: checks the address, your key and the host key before you need the fallback.
|
||||
|
||||
The settings are saved to `ProjectSettings/GitAutoSyncSettings.json`, which is committed with the project, so every computer gets them.
|
||||
|
||||
SSH runs without prompts, so each computer needs two things set up once:
|
||||
|
||||
- The server's host key must be trusted. Run `ssh -T git@<SSH host>` once in a terminal and answer yes.
|
||||
- A key that works without typing: load it into ssh-agent, and add its public key to your account on the git server.
|
||||
|
||||
If you've set `core.sshCommand` or `GIT_SSH`, that's used as-is.
|
||||
|
||||
Only HTTP 413 triggers the fallback; other push failures are reported as usual. Git LFS files upload through LFS's own transfer, which goes over HTTPS unless the server allows LFS over SSH (for Gitea, `LFS_ALLOW_PURE_SSH`).
|
||||
|
||||
## Install
|
||||
|
||||
**Embedded:** copy the `net.lenrui.git-auto-sync` folder into the project's `Packages/` folder. It becomes part of the project and is committed along with it.
|
||||
@@ -26,8 +48,9 @@ If something can't be done safely (a conflict, no network, a failed push), it as
|
||||
- **Enabled**: on by default.
|
||||
- **Ask Before Committing on Close**: off by default, so closing commits and pushes without a prompt.
|
||||
- **Pull Latest Now** and **Commit and Push Now**: run either half by hand.
|
||||
- **Settings...**: opens Project Settings > Git Auto Sync.
|
||||
|
||||
Settings are stored per project, per machine.
|
||||
The two toggles are stored per project, per machine. The SSH settings are shared through the project (see above).
|
||||
|
||||
## What gets committed
|
||||
|
||||
|
||||
Reference in new issue
Block a user