Install git with SSH login on Windows 10

Macklus
Macklus
Sep 9, 2018 · 2 min read

Disclaimer

This manual is doing on 09/2018. Windows, git, bitbucket or universe options can change on any moment.

If you find any problem on this, please let me know.

What are we going to do

I start working with other people on mobile development. So far i always use windows, they dont (and the really dont have to), so they need to configure their PC to work on same environment as i do.

Using git on diferent environment or operating systems are not really hard to do, excep on one question: SSH keys and login.

SSH keys and login are git features who allow us to login on server (like github or bitbucket) without using username/password. That is more fast on daily work and do our work more easy.

If you are usign SSH keys on git, you see git urls like git@bitbucket.org:user/repo.git, instead of https://user@bitbucket.org/user/repo.git.

Also, if you use submodules (i do), any submodule also use same url schema, so you cant change root url and forget it.

What do we need

Generate our SSH keys

The only we should do to generate our SSH keys is open a “Git Bash” console, and run ssh-keygen.exe command, as in image below.

NOTE: I always press enter when it asked me about passphrase, to leave it blank.

Configure BitBucket

You must add you SSH key on bitbucket, by doing:

  1. Open a text editor like notepad.
  2. Into your home user .ssh directory, open file id_rsa.pub (you should mark “All file types” to see it. Copy their content.
  3. Open BitBucket page
  4. Go to your profile, Settings, SSH Keys
  5. Click on “Add Key” button
  6. Add a name (whatever you want), paste your id_rsa.pub content on Key field

Work with your git repos

Hard work is done, now you can work with git using ssh urls without problem, as you do on Linux or Mac

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade