GitHub使用前期准备

设置ssh

通过邮箱生成公钥和私钥。有个疑问可以同时存在多个私钥吗?

可以,生成的私钥和公钥可以更改名字这样就能区分不同的密钥

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
$ ssh-keygen -t rsa
Generating public/private rsa key pair.
Enter file in which to save the key (/root/.ssh/id_rsa):/root/.ssh/id_rsa_aaa
Enter passphrase (empty for no passphrase):
Enter same passphrase again:
Your identification has been saved in /root/.ssh/id_rsa_aaa.
Your public key has been saved in /root/.ssh/id_rsa_aaa.pub.
The key fingerprint is:
9b:92:f6:1f:d2:72:bd:72:19:45:42:5f:e4:65:33:64 root@AY140122145815620396Z
The key's randomart image is:
+--[ RSA 2048]----+
| .. .E=|
| ..o++|
| o. .|
| . |
| S . |
| . + .. |
| + = + .o |
| . o +..o. |
| ...o. |
+-----------------+

Enter file in which to save the key (/root/.ssh/id_rsa):/root/.ssh/id_rsa_aaa这个才是一台电脑生成多个密钥的关键。
冒号后面是路径以及文件名称

剩下的操作就是想github中考入公钥

社区功能

Follow功能是把你关注人的动态信息显示在自己的控制面板的页面中。来了解这个人在github中都做了什么。

Watch功能是用来获取仓库信息

Git基本操作

  1. 创建项目名称文件夹
  2. git init (创建.git文件)
  3. git status 查看仓库状态