2.2Git for windows安装及基本设置

2019-09-17  本文已影响0人  张都尉
$ cd ~./ssh
bash: cd: ~./ssh: No such file or directory
$  ssh-keygen -t rsa -C "XXX@mail.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/c/Users/admin/.ssh/id_rsa):
Created directory '/c/Users/admin/.ssh'.
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /c/Users/admin/.ssh/id_rsa.
Your public key has been saved in /c/Users/admin/.ssh/id_rsa.pub.
The key fingerprint is:
SHA256:UreMs3qPwSJhPcUnBQ2hzHTyXa7pOBMJ3qph4RLVjF8 XXX@mail.com
The key's randomart image is:
+---[RSA 3072]----+
|      o ==. .    |
|     B * o.o     |
|    o B E + .    |
|   . + * B +     |
|  . + * S =      |
|   + o = *       |
|  . = o B .      |
|   o + o.=       |
|    . .....      |
+----[SHA256]-----+

admin@env-machine MINGW64 ~/.ssh
$ pwd
/c/Users/admin/.ssh

admin/@env-machine MINGW64 ~/.ssh
$ ls
id_rsa  id_rsa.pub  known_hosts

admin@env-machine MINGW64 ~/.ssh
$ ssh -T git@192.168.3.41
The authenticity of host '192.168.3.41 (192.168.3.41)' can't be established.
ECDSA key fingerprint is SHA256:ZcsnMVqtJ4paQk9hWt6J39D3tlGKWJLk/MCGHT4s/TA.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.3.41' (ECDSA) to the list of known hosts.
Welcome to GitLab, @root!

至此,出现welcom to gitlab成功登陆信息

git config --global user.name "Firstname Lastname" (此处name可修改也不是用于登录gitlab的登录名)
git config --global user.email "your_email@youremail.com"

设置自己的git信息即完成安装和设置,可以输入git config --list查看自己的git信息。

上一篇 下一篇

猜你喜欢

热点阅读