fix(TLS 驗證): 套用全域憑證忽略設定

This commit is contained in:
2026-06-26 09:20:57 +00:00
parent 4431f2fec5
commit bc0df06445
5 changed files with 21 additions and 10 deletions
+7 -1
View File
@@ -61,7 +61,13 @@ function makeRunner(spawn) {
function withAskpass(workspace, fn, token = GITEA_TOKEN) {
const askpassScript = path.join(workspace, '.git-askpass.sh');
fs.writeFileSync(askpassScript, '#!/bin/sh\necho "$GIT_TOKEN"\n', { mode: 0o700 });
const credEnv = { ...process.env, GIT_ASKPASS: askpassScript, GIT_USERNAME: 'x-token', GIT_TOKEN: token };
const credEnv = {
...process.env,
GIT_ASKPASS: askpassScript,
GIT_SSL_NO_VERIFY: 'true',
GIT_USERNAME: 'x-token',
GIT_TOKEN: token,
};
const cleanup = () => { try { fs.unlinkSync(askpassScript); } catch {} };
let result;
try {