p41 跨团队协作操作演示
p42 SSH免密登陆
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((17efae6...))
$ ssh-keygen -t rsa -C 409731725@qq.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:lvXYv0nJJJF83y8s7Kf7iMW4Eod4y3AXqvLyanxxxxx xxxxxx@qq.com
The key's randomart image is:
+---[RSA 3072]----+
| |
| . . |
| . . + . |
| o o.+ o ..|
| . . .So..+ . o|
| E . +.* o+ * ..|
| . + * =. = B .|
| * . + = +.+ |
| o.*o .o ==+ |
+----[SHA256]-----+
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((17efae6...))
$ cd .ssh
bash: cd: .ssh: No such file or directory
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((17efae6...))
$ cd ~
Administrator@F4HFJA67XY3IIM1 MINGW64 ~
$ cd ~/.ssh
Administrator@F4HFJA67XY3IIM1 MINGW64 ~/.ssh
$ ll -l
total 5
-rw-r--r-- 1 Administrator 197121 2602 9月 15 14:18 id_rsa
-rw-r--r-- 1 Administrator 197121 570 9月 15 14:18 id_rsa.pub
Administrator@F4HFJA67XY3IIM1 MINGW64 ~/.ssh
$ cat id_rsa.pub
ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABgQDjN/xpKk1/CK2UyFm58MZghyxiGIT3qe7/TmVC4DWkurOoPsO+1pO3eIDoOl3sVgIDvIKUNjKrUNkX/+SqQf3lO5ILBtBOcN1b8Y+XocLNImMn0PV7tIXwCoPUqklcBlOluGyen0SSG9TVLdUGF1CBcGR0roRBFMBSm0d7f/ZrSV4hnchBwYYYF2bYB+5kDG6JewhWEfkCyPL/kVWgLGb+IPFM1Der3XQ3XuwVttrnv4OKQSzmXge0gK6AfsgKXj9l1Mypk8acJm9nVpB3XD07xg6Sy6BpffuECPOCEWEEk52LjY80h4vlrwaao4Q2qiNZwo9mm+cn23wmp5AFP/mrj2EEa1Bmf4CtFz7enMJ/fPxdel2MFj9OZBpQASAb9/hwgqK0LD5BxclU9NlrVpd1Y06krLA0U8ihWB/rMdIT5tmrIELQ80+7PZh5ebcKNICHnjN0ahKSKNUrDgS9AWk/8PlJwow0j6++gGM1CeGZhUqI4ghDG6gnYB3NwB5GMys= 409731725@qq.com
Administrator@F4HFJA67XY3IIM1 MINGW64 ~/.ssh
$ cd
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((17efae6...))
$ vim huashanjianfa.txt
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((17efae6...))
$ git commit -m "test ssh login" huashanjianfa.txt
warning: LF will be replaced by CRLF in huashanjianfa.txt.
The file will have its original line endings in your working directory
warning: LF will be replaced by CRLF in huashanjianfa.txt.
The file will have its original line endings in your working directory
[detached HEAD ca413a4] test ssh login
1 file changed, 3 insertions(+)
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((ca413a4...))
$ git remote add origin_ssh git@github.com:crackggt1314/TestingHS.git
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((ca413a4...))
$ git remote -v
hs https://github.com/crackggt1314/TestingHS.git (fetch)
hs https://github.com/crackggt1314/TestingHS.git (push)
origin https://github.com/crackggt1314/test.git (fetch)
origin https://github.com/crackggt1314/test.git (push)
origin_ssh git@github.com:crackggt1314/TestingHS.git (fetch)
origin_ssh git@github.com:crackggt1314/TestingHS.git (push)
Administrator@F4HFJA67XY3IIM1 MINGW64 /c/gitExercise/huashan ((ca413a4...))
$ git push origin_ssh master
The authenticity of host 'github.com (13.229.188.59)' can't be established.
RSA key fingerprint is SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8.
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added 'github.com,13.229.188.59' (RSA) to the list of known hosts.
Everything up-to-date
p43 Eclipse中git插件
p44 Eclipse中 把工程初始化为本地库