新路程------从零开始git

 之前搞的都忘了,今天记录一下

首先是在ubuntu上安装git 貌似命令是sudo apt-get install git ,记错了请百度

然后是到远程服务器上申请一个账号,然后开始git clone,很不幸失败了

如下

matt@ubuntu:~/Documents/imx6$ git clone git@git.oschina.net:eric.zhc/imx6.git
Cloning into 'imx6'...
The authenticity of host 'git.oschina.net (218.11.0.86)' can't be established.
ECDSA key fingerprint is 27:e5:d3:f7:2a:9e:eb:6c:93:cd:1f:c1:47:a3:54:b1.
Are you sure you want to continue connecting (yes/no)? no
Host key verification failed.
fatal: Could not read from remote repository.


Please make sure you have the correct access rights
and the repository exists.

因为没有key,所以要搞key

关于搞key这边有个链接看看就好http://git.mydoc.io/?t=180845

matt@ubuntu:~/Documents/imx6$ ssh-keygen -t rsa -C "56855106@qq.com"
Generating public/private rsa key pair.
Enter file in which to save the key (/home/matt/.ssh/id_rsa): 
Enter passphrase (empty for no passphrase): 
Enter same passphrase again: 
Your identification has been saved in /home/matt/.ssh/id_rsa.
Your public key has been saved in /home/matt/.ssh/id_rsa.pub.
The key fingerprint is:
86:b1:76:ec:24:c9:19:ee:d0:b2:07:38:a0:bc:e2:3d 56855106@qq.com
The key's randomart image is:
+--[ RSA 2048]----+
|                 |
|                 |
|.     o          |
|o. . + O         |
|..o + @ S        |
|  .. B *         |
|..  . o .        |
|o .E .           |
| . ..            |
+-----------------+

这里有个蛋疼的地方是要先到

/.ssh/id_rsa.pub这个目录下去copy 然后贴到网页上

这样才能生成key

最后搞定

matt@ubuntu:~/Documents/linux-3.0.35$ ssh -T git@git.oschina.net
The authenticity of host 'git.oschina.net (218.11.0.86)' can't be established.
ECDSA key fingerprint is 27:e5:d3:f7:2a:9e:eb:6c:93:cd:1f:c1:47:a3:54:b1.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'git.oschina.net,218.11.0.86' (ECDSA) to the list of known hosts.
Connection closed by 218.11.0.86
matt@ubuntu:~/Documents/linux-3.0.35$ ssh -T git@git.oschina.net
Welcome to Git@OSC, matthew_xuan!

上传文件么,我的/imx6/目录下有个imx6,把新的文件放到这边,然后git add .

然后git commit就可以了

如果下载谷歌源码失败

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值