fix: Artificer GitHub SSH absolute-path git fetch

This commit is contained in:
Claude Code
2026-06-10 21:15:41 +08:00
parent b895f5d925
commit 7864eb8f04
5 changed files with 37 additions and 7 deletions
+2 -2
View File
@@ -15,7 +15,7 @@ selftest-private-key-material
${privateKeyFooter}
`;
const knownHosts = "github.com ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIselftestKnownHostsKey\n";
const sshConfig = "Host github.com\n HostName ssh.github.com\n User git\n Port 443\n IdentityFile ~/.ssh/id_ed25519\n";
const sshConfig = "Host github.com\n HostName ssh.github.com\n User git\n Port 443\n IdentityFile /home/agentrun/.ssh/id_ed25519\n UserKnownHostsFile /home/agentrun/.ssh/known_hosts\n";
const selfTest: SelfTestCase = async (context) => {
const fakeKubectl = path.join(context.tmp, "fake-tool-kubectl.js");
@@ -124,7 +124,7 @@ function assertNoCredentialLeak(value: unknown): void {
assert.equal(text.includes("selftest-private-key-material"), false);
assert.equal(text.includes(privateKeyHeader), false);
assert.equal(text.includes("AAAAC3NzaC1lZDI1NTE5AAAAIselftestKnownHostsKey"), false);
assert.equal(text.includes("IdentityFile ~/.ssh/id_ed25519"), false);
assert.equal(text.includes("IdentityFile /home/agentrun/.ssh/id_ed25519"), false);
}
async function runCliJson(context: { root: string }, args: string[]): Promise<JsonRecord> {