既然要git,我们都希望用最新的,这是我写的更新到官网最新的博客
我是比较喜欢廖雪峰写的,写的很清楚明白,链接到他的网址 但是Ubuntu系统生成密匙之后,找不到在哪儿。。。
(ps:我之前是在Windows10上用过git,现在只说问题,其他的一些的可以看廖雪峰的官网)
此命令,生成密匙
ssh-keygen -t rsa -C "your_email@example.com"
直接用此命令查看公共密匙文件
cat ~/.ssh/id_rsa.pub
然后复制到你的github上去,至于复制到哪儿,看上边的网址
再用
ssh -T git@github.com
查看是否链接到github。
解决每次推送都需要输入账号和密码
修改仓库下的 .git/config 文件,将
[remote "origin"]
url = https://github.com/username/repo.git
修改为
[remote "origin"]
url = git@github.com:username/repo.git
如果找不到上边的文件可以用此命令
sudo gedit .git/config
参考网址
http://blog.csdn.net/u013687821/article/details/41861927