git基本操作及设置
Posted wstmljf
tags:
篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了git基本操作及设置相关的知识,希望对你有一定的参考价值。
$ git config --global user.name "wstmljf"
$ git config --global user.email "wstmljf@163.com"
$ git config --global core.autocrlf false
$ git config --global core.quotepath off
$ git config --global core.ignorecase false
$ ssh-keygen -t rsa -C "wstmljf@163.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/Administrator/.ssh/id_rsa):
Created directory ‘/c/Users/Administrator/.ssh‘.
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:v+uRJrqxbPIfyXF3AoiQnml20rKbBfNiSsSdyRheMyI yefengtgm@163.com
The key‘s randomart image is:
+---[RSA 2048]----+
| .. |
|E o =. . . |
| + O O. . . |
| = / o . |
| . o O S . o . |
| . + o. = o o |
| . o =. = = |
| . +..+ + o |
| +*o..+. |
+----[SHA256]-----+
$ ssh-add ~/.ssh/id_rsa(第一次执行会报如下信息)
Could not open a connection to your authentication agent.
$ eval `ssh-agent`
Agent pid 3428
$ ssh-add ~/.ssh/id_rsa(正常)
Identity added: /c/Users/Administrator/.ssh/id_rsa (/c/Users/Administrator/.ssh/id_rsa)
$ cat ~/.ssh/id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQCvxLyuTGvVOg+5D56D23j7C/Wkbi1wfPk9hHR2WH+hPGu2AXuZ/qGyskXfk7EvLgc/gBYu+RiyStUxZlBSl6kqJQ0KcpdgsTO0Ua67WVVnZKp2ItZqOEzUFvGqeOHL5kAMTAYtRbLujTUmIWYGTPp/33emUPrLTr5wcuGYJ8MFNUbj/rZtwA58jaHFK1+HefYtfSnWdnZucCKsGU4BFxhzlBb7mAKJgI0F8hmbaG94DQ7q62Cdtb7f5vDaLeswiYfFNLs/6SR28akvf0DDPy+Fg3TYPjbgxxPd53ueedGx8GvNFlRWb76JJISoRTpZePfmUn2cquhYpDdn0SjjVdvj yefengtgm@163.com
以上是关于git基本操作及设置的主要内容,如果未能解决你的问题,请参考以下文章