Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

Configuration of SSH connection Git

2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >

Share

Shulou(Shulou.com)06/02 Report--

This article mainly explains the "SSH connection Git configuration", the article explains the content is simple and clear, easy to learn and understand, the following please follow the editor's ideas slowly in depth, together to study and learn "SSH connection Git configuration" bar!

If you use ssh to manage, you need to configure ssh key.

1. Open the git bash command window 2 and generate ssh keyssh-keygen-t rsa-b 4096-C "your_email@example.com"

Your_email@example.com is your registered email address on github.

Complete the creation process as follows:

$ssh-keygen-t rsa-b 4096-C "test@qq.com"

Generating public/private rsa key pair.Enter file in which to save the key (/ c/Users/Administrator/.ssh/id_rsa): Enter passphrase (empty for no passphrase): Enter same passphrase again:Your identification has been saved in / c/Users/Administrator/.ssh/id_rsa.Your public key has been saved in / c/Users/Administrator/.ssh/id_rsa.pub.The key fingerprint is:SHA256:chS9dRlB6Ee+E6/Ob9plXh6HXgDhhOk6mpST+oqrCxA test@qq.comThe key's randomart image is:+--- [RSA 4096]-+ |.. Ostensibly added | |. + oo.+ | | E.. +. +. | |. . O. +. | |. .oS. . + o | |. = oo ooo | |. O +. + * | |. .. O.. = * | | ooo..o. . + = | +-[SHA256]-+

By default, the above is generated in the .ssh directory of the user's home directory, and you can enter your own custom location.

3. Add ssh key to github

Copy the contents of the file c/Users/Administrator/.ssh/id_rsa.pub and add key to: github > settings > SSH and GPG keys > New SSH key > paste and save.

4. Test SSH connection $ssh-T git@github.com

As shown below, the connection has been successful:

$ssh-T git@github.comHi Javastack! You've successfully authenticated, but GitHub does not provide shell access.

Now you can clone and submit code through SSH.

For more detailed configuration, please refer to the official configuration:

Https://help.github.com/articles/connecting-to-github-with-ssh/ thank you for reading, the above is the content of "SSH connection Git configuration", after the study of this article, I believe you have a deeper understanding of the configuration of SSH connection Git, and the specific use needs to be verified in practice. Here is, the editor will push for you more related knowledge points of the article, welcome to follow!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Internet Technology

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report