feat(clone): support credentialed git clone with askpass
Cloning now accepts optional username/password and passes them to the Rust git layer via GIT_ASKPASS, avoiding interactive prompts. The UI detects authentication failures, opens the credential dialog for clone, and auto-hides error messages to keep the flow smooth. - Add username/password support to clone_repository and git.ts - Detect auth failures and route users to the clone credential dialog - Improve clone UX with a dedicated loading overlay and timed errors
This commit is contained in:
@@ -38,12 +38,16 @@ export function cloneRepository(
|
||||
remoteUrl: string,
|
||||
parentPath: string,
|
||||
directoryName?: string,
|
||||
username?: string,
|
||||
password?: string,
|
||||
commitLimit = 100,
|
||||
): Promise<RepositoryBundle> {
|
||||
return invoke<RepositoryBundle>("clone_repository", {
|
||||
remoteUrl,
|
||||
parentPath,
|
||||
directoryName: directoryName?.trim() ? directoryName.trim() : null,
|
||||
username: username ?? null,
|
||||
password: password ?? null,
|
||||
commitLimit,
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user