Starting from the 1.8 (November) update of vscode you can now clone your Git repository from within the vscode.
You can execute it from the Command Palette. Press F1 (or ⇧+⌘+P on Mac) and search for Git: Clone. Confirm the command and paste the repository url.
Where is VS Code cloning a git repository? - Stack Overflow
How to "git clone " in Visual studio code - Stack Overflow
github - How do I connect to my existing Git repository using Visual Studio Code? - Stack Overflow
github - How do I clone a private git repo with ssh in vscode? - Stack Overflow
Starting from the 1.8 (November) update of vscode you can now clone your Git repository from within the vscode.
You can execute it from the Command Palette. Press F1 (or ⇧+⌘+P on Mac) and search for Git: Clone. Confirm the command and paste the repository url.
There are now two programmatic ways how to clone a repository. VS Code handles the vscode:// protocol now, so you could clone a repository by clicking on a link somewhere on a web page
For example, clicking on the following link invokes VS Code, lets you select a folder on your disk, fetches the code and finally suggests to open that location as a workspace.
vscode://vscode.git/clone?url=https%3A%2F%2Fgithub.com%2Fmicrosoft%2Fvscode-extension-samples
Alternatively, if you are trying to trigger the cloning from an extension code, use the built-in VS Code command git.clone with the repo url as the only argument.
import { commands} from 'vscode';
commands.executeCommand("git.clone", "https://github.com/microsoft/vscode-extension-samples");
Both seem to do the same as the Git: Clone command mentioned by Jakub.
You can do explorer.exe . in your terminal to see the absolute path of the folder you are currently in. It should be something like C:\<some more stuff here>.
If you want to clone the repository elsewhere, then make sure Powershell is open in your Terminal, cd into the folder you want it to be in and git clone it there. As an example:
cd C:\Users\<your windows username>\Documents\;
git clone https://github.com/Azure-Samples/cognitive-services-speech-sdk.git;
If the first line doesn't work then that means you're in a linux terminal for which you can do:
cd /C/Users/<your windows username>/Documents;
git clone https://github.com/Azure-Samples/cognitive-services-speech-sdk.git;
When cloning a repository with the command palette, VS Code clones the repo in the path specified in the setting git.defaultCloneDirectory (/home/vscode/ might be proposed because set in this config variable). If git.defaultCloneDirectory is not set, VS Code clones the repository in the user's folder. On Windows, this corresponds to C:\Users\<Your-User>\.
If you want to specify a path for git.defaultCloneDirectory, just go to File > Preferences > Settings and then, either search for git.defaultCloneDirectory, or browse to Extension > Git > Default Clone Directory.
As a side note, if you clone a repository from VS Code bash without supplying a destination directory, the repo is always cloned in the user's folder, even if git.defaultCloneDirectory is set. git.defaultCloneDirectory is used only with the command palette.
- Open Visual Studio Code terminal (Ctrl + `)
Write the Git clone command. For example,
git clone https://github.com/angular/angular-phonecat.gitOpen the folder you have just cloned (menu File → Open Folder)

Another option is to use the built-in Command Palette, which will walk you right through cloning a Git repository to a new directory.
From Using Version Control in VS Code:
You can clone a Git repository with the Git: Clone command in the Command Palette (Windows/Linux: Ctrl + Shift + P, Mac: Command + Shift + P). You will be asked for the URL of the remote repository and the parent directory under which to put the local repository.
At the bottom of Visual Studio Code you'll get status updates to the cloning. Once that's complete an information message will display near the top, allowing you to open the folder that was created.
Note that Visual Studio Code uses your machine's Git installation, and requires 2.0.0 or higher.
I just went through this today. I'm assuming you already have Git for Windows installed and have generated the ssh keys located in your user's ".ssh" folder. After that, you must go to the settings in your GitHub account online and look for the "SSH and GPG Keys" option in the menu on the left:

This is where you have to enter your public key by opening the "id_rsa.pub" file and then copying its contents into your GitHub account by clicking "New SSH key":

Then you can just use vscode like you would with a regular HTTP connection. Just Crtl+Shift+P to open vscode's Command Pallet, select git: clone, paste the SSH address of GitHub repo you want. In order to get the SSH address when you click the green "Clone or Download" button on a GitHub repo you must also click "Clone with SSH" in the box that pops up so you copy the SSH address instead of using the HTTPS link.
The only hangup you may have is, the first time you try ssh in vscode it will say, "host cannot be identified" The way to fix this is to simply do a git clone from a git bash command line outside of vscode so you can type "yes" to when it asks you if it's ok to add GitHub's SSH key fingerprint.
ROB@WINDOW10 MINGW64 ~/Documents
$ git clone git@github.com:Rob4226/example.git
Cloning into 'Example Repo'...
The authenticity of host 'github.com (140.82.114.3)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? **yes**
Warning: Permanently added 'github.com,140.82.114.3' (RSA) to the list of known hosts.
For whatever reason the vscode git source control UI doesn't show this message for you to respond so it just throws an error. But after you say "yes" the first time in a git bash command line, ssh will work in vscode from now on without issue. It works great and is so much faster! I never use HTTPS anymore from vscode.
Or, you can manually add GitHub's SSH key fingerprints to your "known_hosts" file in the .ssh folder. They can be found here: https://help.github.com/en/github/authenticating-to-github/githubs-ssh-key-fingerprints
GitHub's SSH key fingerprints
Public key fingerprints can be used to validate a connection to a remote server.
These are GitHub's public key fingerprints (in hexadecimal format):
16:27:ac:a5:76:28:2d:36:63:1b:56:4d:eb:df:a6:48 (RSA)
ad:1c:08:a4:40:e3:6f:9c:f5:66:26:5d:4b:33:5d:8c (DSA)
These are the SHA256 hashes shown in OpenSSH 6.8 and newer (in base64 format):
SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 (RSA)
SHA256:br9IjFspm1vxR3iA35FWE+4VTyz1hYVLIE2t1/CeyWQ (DSA)
This is being studiedfor VSCode 1.67 (Apr. 2022) with issue 145850:
"Support cloning via SSH by default when picking a repository using the GitHub extension"
It is already possible today, just paste the SSH URL into the Clone input:
With that being said, there's the feature from the GitHub extension which lets you clone repositories without pasting their URL. That's what you're addressing in #146124. By default, the feature uses what GitHub defines to be the clone_url, which happens to always be HTTPS. We also happen to have automatic authentication against GitHub, making the clone via HTTPS really compelling, since the user never has to worry about auth.
So with PR 146124, this should be supported: you will have with VSCode 1.67 a new setting which can set the default URL schemes to use:
config.gitProtocol":"Controls which protocol is used to clone a GitHub repository",
