diff --git a/extensions/git/src/git.ts b/extensions/git/src/git.ts index 0deb723c9d013..f25bac6234c17 100644 --- a/extensions/git/src/git.ts +++ b/extensions/git/src/git.ts @@ -347,7 +347,7 @@ export class Git { await mkdirp(parentPath); try { - await this.exec(parentPath, ['clone', url, folderPath], { cancellationToken }); + await this.exec(parentPath, ['clone', url.includes(' ') ? encodeURI(url) : url, folderPath], { cancellationToken }); } catch (err) { if (err.stderr) { err.stderr = err.stderr.replace(/^Cloning.+$/m, '').trim();