Get the App
SLTechnology News&Howtos  ›  Network Security  › 

How to realize SSH password-free login when using TortoiseGit

Shulou Source: shulou.com Published: 2022-06-01 03:42:08 10月06日 Update

Recently in the study of Git, every pull/push will prompt for a password, more annoying. And because the network speed is relatively slow, it takes a long time to enter the password. It took a long time to avoid entering the password.

Principle TortoiseGit realizes key authentication based on ssh of putty.

1. Git server configuration 1.1 switches to git and operates under git users to avoid later permission changes su-git1.2 generation key ssh-keygen-t rsa to generate public and private keys

Add the public key to authorized_keyscat id_rsa.pub > > authorized_keyschmod authorized_keys if you are using GitHub, log in to github, click Accounting settings at the top right, select SSH key, click Add SSH key, and copy the contents of the id_rsa.pub.

2 client configuration because TortoiseGit does not use the same key as git, it uses putty. To use the key you just generated, you need to convert it.

2.1 download the private key sz id_rsa2.2 to regenerate the private key, open "puttygen.exe", click "load", select the last private key file id_rsa, and then "save private key" is saved as a ppk file.

2.3 specify the private key at git clone

At this point, the work is done.

Tags: Key generation password public key file input selection configuration login done content principle great power client client time server permissions user network Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno macOS NVidia Microsoft Shulou Tech Info Redmi