Remove Gitea/SSH helper scripts (GITEA-SETUP.md, gitea-push.sh, setup-gitea-ssh.sh, ssh-1password-diagnose.sh)

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-02-03 13:38:55 +01:00
parent b333198d7e
commit b492df3b1a
4 changed files with 0 additions and 123 deletions

View File

@@ -1,53 +0,0 @@
# Gitea + 1Password setup
One-time steps to push to Gitea (http://10.0.10.205/) using your 1Password SSH key.
## One-time setup
1. **Create SSH config for Gitea** (from project root):
```bash
./scripts/setup-gitea-ssh.sh
```
This creates `~/.ssh/gitea-1password-only` so Git uses 1Password for `gitea@10.0.10.205`.
2. **Enable 1Password SSH agent**
In 1Password: **Settings → Developer** → enable **Use the SSH agent**.
3. **Optional: sign commits with your SSH key**
Add the following to your `~/.gitconfig` (and set `name` / `email` if not already set):
```ini
[user]
name = bert.hausmans
email = bert@hausmans.nl
signingkey = ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIIw+E4aOsaDPBruF6PBjloZNaVS3jHVOTXTv9GN/LY5H
[gpg]
format = ssh
[gpg "ssh"]
program = "/Applications/1Password.app/Contents/MacOS/op-ssh-sign"
[commit]
gpgsign = true
```
Then every commit will be signed with your 1Password SSH key (1Password may prompt when signing).
## Pushing
- **From Cursor**: Use the usual Push action. Git uses the repos `core.sshCommand`, which points at 1Password.
- **From Terminal**: Run `./gitea-push.sh` or `git push` from the project root.
**Terminal asking for a password instead of 1Password?** Re-run the setup so SSH uses the 1Password agent: `./scripts/setup-gitea-ssh.sh`, then try `./gitea-push.sh` again from Terminal.app.
**1Password not popping up?** The approval dialog usually only appears when the request comes from **Terminal.app** or **iTerm**, not from Cursors integrated terminal. Run `./gitea-push.sh` from Terminal.app (or iTerm) so 1Password can show the prompt.
**First push in a session:** 1Password may need to approve use of the SSH key once. If Cursors Push hangs or fails, run this in **Terminal.app** (so 1Password can show the approval dialog):
```bash
export SSH_AUTH_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
ssh -T gitea@10.0.10.205
```
Approve in 1Password when asked, then push again from Cursor or `./gitea-push.sh`.

View File

@@ -1,23 +0,0 @@
#!/bin/bash
# Use this to push to Gitea with 1Password.
# Run from Terminal.app or iTerm (not Cursor's terminal) so 1Password can show its approval dialog.
# Step 1 tests the connection so 1Password can show its approval dialog.
# Step 2 runs git push in the same session (1Password may not prompt again).
set -e
OP_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
if [ ! -S "$OP_SOCK" ]; then
echo "1Password SSH agent socket not found at: $OP_SOCK"
echo "Enable it: 1Password → Settings → Developer → Use the SSH agent"
exit 1
fi
echo "Step 1: Test SSH (approve in 1Password when it pops up)..."
echo " If nothing pops up, run this script from Terminal.app or iTerm, not Cursor."
export SSH_AUTH_SOCK="$OP_SOCK"
ssh -F "$HOME/.ssh/gitea-1password-only" -T gitea@10.0.10.205 || true
echo ""
echo "Step 2: Pushing to Gitea (same session = no 1Password prompt)..."
exec git push "$@"

View File

@@ -1,22 +0,0 @@
#!/bin/bash
# One-time setup: creates ~/.ssh/gitea-1password-only so git push uses 1Password for Gitea.
# Run from project root: ./scripts/setup-gitea-ssh.sh
set -e
SSH_DIR="$HOME/.ssh"
CONFIG_FILE="$SSH_DIR/gitea-1password-only"
OP_SOCK="$HOME/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
mkdir -p "$SSH_DIR"
cat > "$CONFIG_FILE" << 'EOF'
Host 10.0.10.205
User gitea
HostName 10.0.10.205
IdentityAgent "/Users/berthausmans/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
EOF
echo "Created $CONFIG_FILE"
echo ""
echo "Next: enable \"Use the SSH agent\" in 1Password (Settings → Developer)."
echo "Then you can push from Cursor or run: ./gitea-push.sh"

View File

@@ -1,25 +0,0 @@
#!/bin/bash
# Run in Terminal. Shows which SSH agent and key are used for Gitea.
# If you see "id_rsa" → SSH is NOT using 1Password (no prompt).
# If you see "SHA256:KY3A6J1..." → SSH is using 1Password.
OP_AGENT="/Users/berthausmans/Library/Group Containers/2BUA8C4S2C.com.1password/t/agent.sock"
echo "=== Which agent does SSH use for gitea@10.0.10.205? ==="
echo ""
echo "Running: ssh -v -T gitea@10.0.10.205 2>&1 | grep -E '(identity|agent|Offering|Authentications)'"
echo ""
ssh -v -T gitea@10.0.10.205 2>&1 | grep -E '(identity file|IdentityAgent|get_agent_identities|Offering public key|Authentications that can continue)' || true
echo ""
echo "---"
echo "If you see 'id_rsa' above → SSH is using the system agent, NOT 1Password."
echo "If you see 'SHA256:KY3A6J1r8Shvf...' (Offering public key) → 1Password is used."
echo ""
echo "This repo is set to use 1Password for git (core.sshCommand)."
echo "Test Gitea (bypass config, force 1Password):"
echo " SSH_AUTH_SOCK=\"$OP_AGENT\" ssh -F /dev/null -o IdentitiesOnly=yes -o User=gitea -o HostName=10.0.10.205 -T gitea@10.0.10.205"
echo ""
echo "Then: git push -u origin main (uses 1Password via repo config)"
echo ""