~/.ssh/id_rsa
will be used.~/.ssh/id_rsa.pub
- the one with the pub
extension. BE EXTRA CAREFUL when using your ~/.ssh/id_rsa
file. This is your private key, guard it properly.git remote -v
in your Git client.git remote set-url <remote name, e.g. origin> <new SSH URL>
. Alternatively, in Visual Studio, go to Repository Settings, and edit your remotes.bash
is the common shell on Linux and macOS and the Git for Windows installation adds a shortcut to Git Bash in the Start menu.Other shell environments will work, but are not covered in this article.~/.ssh
folder (for example, /home/jamal/.ssh or C:Usersjamal.ssh) and look for the following files:ssh-keygen
command from the bash
prompt. This command will create a 2048-bit RSA key for use with SSH. You can give a passphrasefor your private key when prompted—this passphrase provides another layer of security for your private key.If you give a passphrase, be sure to configure the SSH agent to cache your passphrase so you don't have to enter it every time you connect.dev.azure.com
.dev.azure.com/{your organization}/{your project}
, but you can still use the existing visualstudio.com
format. For more information, see VSTS is now Azure DevOps Services.git clone
from the command prompt.ssh.dev.azure.com
or vs-ssh.visualstudio.com
, the fingerprint should match one of the following formats:97:70:33:82:fd:29:3a:73:39:af:6a:07:ad:f8:80:49
(RSA)SHA256:ohD8VZEXGWo6Ez8GSEJQ9WpafgLFsOfLOtGGQCQo6Og
(RSA)These fingerprints are also listed in the SSH public keys page.yes
. Git will clone the repo and set up the origin
remote to connect with SSH for future Git commands.ssh-keyscan -t rsa domain.com >> ~/.ssh/known_hosts
ssh-agent
process in Powershell or the Windows Command Prompt. ssh-agent
will cacheyour passphrase so you don't have to provide it every time you connect to your repo.ssh-keygen
command run against your public key usingthe bash
command line. You will need to change the path and the public key filename if you are not using the defaults.origin
remote in Git to change over from a HTTPS to SSH URL. Once you have the SSH clone URL, run the following command:origin
.ssh-keygen
in a different place than the default, you do two things:ssh-add
command, providing the full path to the private key.ssh-add
, you will need to run the following command from included in Git for Windows:ssh-add
as part of the Git for Windows distribution and also run it in any shell environment on Windows.ssh-agent
running before running ssh-add
, but the command environment on these platforms usuallytakes care of starting ssh-agent
for you.~/.ssh/config
file (for example, /home/jamal/.ssh
or C:Usersjamal.ssh
) as follows: