github入门(一)

1.注册github帐号

注册操作就不说了。

2.安装git

执行:

sudo apt-get install git
git --version

3.配置参数

git config --global user.name "name"  //配置用户名 
git config --global user.email "email"  //配置email 
git config --list                                    //查看配置 信息

创建公钥,输入:

ssh-keygen -t rsa -C "email"

连按三次回车,得到密钥:

+---[RSA 2048]----+
|                 |
|           . .   |
|        . . . +  |
|       . + . . = |
|        S E + = o|
|       + * = = B |
|      ....+ = = B|
|      ooo..+ . @.|
|    o=. o=o   +oB|
+----[SHA256]-----+

执行,在setting里选择SSH and GPG keys,titile随便起,将结果复制到keys里面,然后确定。

cat ~/.ssh/id_rsa.pub

验证一下:

ssh -v git@github.com 

结果如下表示成功:

Hi RoseGavinbill! You've successfully authenticated, but GitHub does not provide shell access.
debug1: channel 0: free: client-session, nchannels 1
Connection to github.com closed.
Transferred: sent 3476, received 2256 bytes, in 1.3 seconds
Bytes per second: sent 2691.2, received 1746.6
debug1: Exit status 1
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值