Steps to enable two-step verification in Bitbucket and SSH connection with Tortioise Git needed for this.
The target audience and content of this article
This article is for people who use TortoiseGit as their Git client software and Bitbucket for hosting their repositories. This article summarizes the steps to generate SSH keys to enable two-step verification on Bitbucket and configure them on TortoiseGit and Bitbucket.
Configuration for TortoiseGit.
Step 01. Generate your public and private keys with PuTTYgen
PuTTYgen is a tool to generate the public and private keys you will need for SSH connections. If you have TortoiseGit installed, PuTTYgen will be included in the package.
However, you may not know where to find PuTTYgen, so if you are using Windows 10, open the search window by pressing
Win mark + S and enter "PuTTYgen" to find it.
Once launched, click on the
Generate button to generate the key.
After clicking the button, you can generate a random key by moving the mouse in the area below the progress bar.
Move the mouse in the space below the progress bar in the following image.
Once generated, enter your passphrase (password) in the
Key passphrase and
Confirm passphrase fields, and click
Save private key to save the ppk file (putty private key).
Also, copy and save the public key string described in the
Public key for pasting into OpenSSH authorized key file.
Step 02. Configure SSH connection for push
Open the configuration dialog by clicking
Manage in the
Remote section of the
Destination dialog that appears when you push.
Then, select the repository you want to SSH from the remote repositories in the dialog that appears, and then click the
... button in the
Putty Key section and select the private key you just saved.
Once selected, click the
Add New/Save button to save it.
When saving the file, you may be asked the following question, but you can proceed.
"The remote repository already exists. Do you want to overwrite it?"
Step 03. Push.
The configuration is now complete. Try to push to the remote repository as usual.
A dialog will open asking you to enter the passphrase you just set.
If you can push without any problems, you have successfully pushed using TortoiseGit over an SSH connection.
Step 01. Register your public key
First, go to the Bitbucket account settings page.
Here↓ ssh keys - Bitbucket
Add key button and paste the name of the key and the public key to save it.
Step 02. Install the two-step verification app "Twilio Authy" on your smartphone.
You will now be able to set up two-step verification.
Two-step verification in the account menu and go to the settings page.
The page is as follows
two-step verification - Bitbucket.
Here you will be prompted to install an app for two-step verification
Install the app according to your smartphone device, such as iPhone (iPhone) or Android.
Step 03. Set up two-step verification
After the application is installed on your smartphone, launch it.
When you launch the app, register your phone number and other information.
Once done, press the Add Account button on the app side to launch the QR code reader.
Then scan the QR code displayed on the Bitbucket two-step verification page.
After scanning, you will be prompted to set a password for backup, so create and save it.
After that, you just need to enter the token (number) displayed in
Twilio Authy into the Bitbucket screen.
Step 04. Final Step : Check Your Email and Activate
You will receive a confirmation email to the email address registered in your account.
The subject line is as follows [Bitbucket] Finish enabling two-step verification
Step 05. Save your backup code.
Once the two-step verification is complete, you will see a backup code on the Bitbucket admin screen in case you lose your phone and can't access the two-step verification app. Save this somewhere and you're all set.
Side note : What is PuTTY?
It is an open source client software for logging into servers via SSH or other means.
It's read as パティ in Japanese.
For more information, click here.
PuTTY - Wikipedia