From a1f70a5b4625de7b588d43b7e8c7cf46e1d9c5b4 Mon Sep 17 00:00:00 2001 From: EENE Dashboard Date: Wed, 17 Jun 2026 17:01:20 +0900 Subject: [PATCH] Fix Gitea upload script to use SSH port 222 Co-authored-by: Cursor --- scripts/gitea-upload.ps1 | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/scripts/gitea-upload.ps1 b/scripts/gitea-upload.ps1 index 0ff105a..d2c2a92 100644 --- a/scripts/gitea-upload.ps1 +++ b/scripts/gitea-upload.ps1 @@ -30,8 +30,11 @@ Write-Host '[2/4] SSH test...' -ForegroundColor Yellow $keyPath = Join-Path $env:USERPROFILE '.ssh\id_ed25519_eene_dashboard' $fp = ssh-keygen -lf $pubKeyPath 2>$null if ($fp) { Write-Host " Key fingerprint: $fp" -ForegroundColor DarkGray } +$giteaHost = '172.16.10.175' $giteaPort = 222 -$test = ssh -i $keyPath -T git@172.16.10.175 -p $giteaPort -o IdentitiesOnly=yes -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new 2>&1 | Out-String +$giteaRepo = 'RyuWonJun/eene_dashboard.git' +$sshConfig = Join-Path $env:USERPROFILE '.ssh\config' +$test = ssh -F $sshConfig -i $keyPath -T "git@${giteaHost}" -p $giteaPort -o IdentitiesOnly=yes -o ConnectTimeout=10 -o StrictHostKeyChecking=accept-new 2>&1 | Out-String Write-Host $test.TrimEnd() if ($test -match 'Permission denied') { Write-Host '' @@ -57,11 +60,13 @@ Set-Location $projectRoot Write-Host '' Write-Host '[3/4] git remote gitea...' -ForegroundColor Yellow +$giteaUrl = "ssh://git@${giteaHost}:${giteaPort}/${giteaRepo}" +$env:GIT_SSH_COMMAND = "ssh -F `"$sshConfig`"" $remotes = @(git remote 2>$null) if ($remotes -contains 'gitea') { - git remote set-url gitea 'git@gitea-eene:RyuWonJun/eene_dashboard.git' + git remote set-url gitea $giteaUrl } else { - git remote add gitea 'git@gitea-eene:RyuWonJun/eene_dashboard.git' + git remote add gitea $giteaUrl } Write-Host ''