Compare commits

...

3 commits

Author SHA1 Message Date
Cem Baspinar
62030774ec
Merge cf9aefef5a into 7c72578765 2025-12-04 22:06:58 -08:00
Cem Baspinar
cf9aefef5a
fix 2025-11-19 00:11:13 +03:00
Cem Baspinar
7bc4e4892e
Bitbucket auth fix 2025-11-19 00:07:48 +03:00

View file

@ -186,7 +186,11 @@ export const getAuthCredentialsForRepo = async (repo: RepoWithConnections, logge
const config = connection.config as unknown as BitbucketConnectionConfig;
if (config.token) {
const token = await getTokenFromConfig(config.token);
const username = config.user ?? 'x-token-auth';
// Extract username from email if present (e.g., user@example.com -> user)
// Bitbucket API auth uses the full email, but git clone needs just the username
const username = config.user
? config.user.split("@")[0]
: "x-token-auth";
return {
hostUrl: config.url,
token,
@ -197,7 +201,7 @@ export const getAuthCredentialsForRepo = async (repo: RepoWithConnections, logge
password: token
}
),
}
};
}
} else if (connection.connectionType === 'azuredevops') {
const config = connection.config as unknown as AzureDevOpsConnectionConfig;