因为自己摸索,所以代码管理就自然而然想到了当今流行的git。于是乎,拾起了N久前注册帐号,并创建了一个repository。在本地windows机器上装了一个msysgit(),这个过程遇到了一个问题:我把repository创建完后,想克隆本地,遇到了一个问题。
============
#git clone git@github.com:NielRabbit/poc_for_mvc.git
Cloning into 'poc_for_mvc'...
Warning: Permanently added the RSA host key for IP address '192.30.252.131' to the list of known hosts.
Permission denied (publickey).
fatal: Could not read from remote repository.
Please make sure you have the correct access rights
and the repository exists.
============
看样子是,权限不对,提示publickey 问题。
1)查看/生成publickey
#ll ~/.ssh
看到没有key文件存在
#ssh-keygen
生成Key文件,如下图所示

打开id_rsa.pub并copy里面的内容。
2)将key放到Github对应账户
a)登录到你的github账户并打开setting页面,如下图

b)点击"Add SSH Key",将你的key填写进去,并写一个title就好了。
这个时候你再去你的client去clone这个项目,就OK了~~~~~~~~~~~
2)将key放到Github对应账户
a)登录到你的github账户并打开setting页面,如下图

b)点击"Add SSH Key",将你的key填写进去,并写一个title就好了。
这个时候你再去你的client去clone这个项目,就OK了~~~~~~~~~~~