fix(update): fetch rilis dari Gitea, bukan github.com

This commit is contained in:
oxpoe committed 2026-10-14 21:11:52 +07:00
1 parent 19558b9b94
commit 11ccc31933
1 file changed
+2 -2
+2 -2
View File
@@ -396,7 +396,7 @@ function getUpdateInfo(repoRoot) {
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim(); const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
info.repo = _repo || 'origin'; info.repo = _repo || 'origin';
const fetch = _repo const fetch = _repo
? runCmd('git', ['fetch', '--prune', 'https://github.com/' + _repo + '.git', branch], repoRoot) ? runCmd('git', ['fetch', '--prune', 'https://gitea.oxpoe.qzz.io/' + _repo + '.git', branch], repoRoot)
: runCmd('git', ['fetch', '--prune'], repoRoot); : runCmd('git', ['fetch', '--prune'], repoRoot);
if (!fetch.ok) { if (!fetch.ok) {
info.error = 'Gagal git fetch: ' + (fetch.stderr || fetch.stdout || '').trim(); info.error = 'Gagal git fetch: ' + (fetch.stderr || fetch.stdout || '').trim();
@@ -4634,7 +4634,7 @@ router.post('/update/run', requireAdminSession, restrictToAdmin, (req, res) => {
const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim(); const _repo = String(getSetting('update_repo', 'oxpoe/open-isp') || '').trim();
info.repo = _repo || 'origin'; info.repo = _repo || 'origin';
const fetch = _repo const fetch = _repo
? runCmd('git', ['fetch', '--prune', 'https://github.com/' + _repo + '.git', branch], repoRoot) ? runCmd('git', ['fetch', '--prune', 'https://gitea.oxpoe.qzz.io/' + _repo + '.git', branch], repoRoot)
: runCmd('git', ['fetch', '--prune'], repoRoot); : runCmd('git', ['fetch', '--prune'], repoRoot);
pushCmd('git fetch --prune', fetch); pushCmd('git fetch --prune', fetch);
if (!fetch.ok) throw new Error('Gagal git fetch.'); if (!fetch.ok) throw new Error('Gagal git fetch.');