Solutions for using Tortoisegit in Windows that cannot be used directly with Linux Ssh-key

Source: Internet
Author: User

The important reason for writing this article is that many people feel unable to share a key pair directly with the Linux system when they use tortoisegit under Windows
The reason is that tortoisegit default to use the Putty format of the Ssh-key, and the Linux system Ssh-key format is not the same, if you want to use
You must use the key Format conversion tool for the appropriate conversion to use, then there is no other more convenient way, of course, yes
That is to directly change the SSH client of the tortoisegit call to use the SSH client that is consistent with the Linux system, i.e.
Git-for-windows provides an SSH client with the following details:

Tortoisegit setting-->network option-->SSH Client
C:\Program the default value Files\tortoisegit\bin\tortoiseplink.exe
Modified to C:\Program Files\git\usr\bin\ssh.exe

By the way, use the Git bash provided by git-for-windows to generate SSH key operations:
Open git bash, enter ssh-keygen.exe-t rsa-c "email" If you don't want to use a passphrase,
All the way to enter will automatically generate SSH key pair file, key file default save path C:\Users\User_name.ssh,
Open the Sshkeys page of the Gitlab personal settings, and the contents of the Id_rsa.pub file that you just generated
Copy to the key input box and click "Add SSH Key" to add the new public key.

By the way, Ssh-keygen. How to generate key silently

Easier to use in scripts
Ssh-keygen.exe-t rsa-n "-C" email "-F. Ssh/key_name

Do not ask for key passphrase
does not ask where the key file is saved
Of course if key_name already exists, there will be a hint of whether to overwrite the message

Explanation of several options in the method of use:
-t specifies the encryption algorithm
-N ' key phrase for the specified key is empty
-C Comment Information generally fills in a mailbox name or an identifying string
-F to save the path to the generated key file and the file name of the key the file name here does not need to specify an extension
Because the public key and key two files are generated, this file name will be used

Use the experience, like can point likes + collection!

Solutions for using Tortoisegit in Windows that cannot be used directly with Linux Ssh-key

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.