Add git proxy config

This commit is contained in:
Alex Gleason committed 2025-12-24 23:44:54 -06:00
1 parent e288660d3e
commit 4546098df7
3 files changed
+39

No files matched your search

+8
View File
@@ -64,6 +64,7 @@ const gitCredentialSchema = z.object({
origin: z.string(),
username: z.string(),
password: z.string(),
proxy: z.boolean().optional(),
});
// Old format (map of origins to credentials)
@@ -283,6 +284,13 @@ export async function readGitSettings(fs: JSRuntimeFS, configPath = '/config'):
credentials = convertCredentialsToNewFormat(parsed.credentials);
}
// Set default proxy settings if missing
for (const cred of credentials) {
if (!('proxy' in cred)) {
cred.proxy = ['https://github.com', 'https://gitlab.com'].includes(cred.origin);
}
}
return {
...parsed,
credentials,