在git.oschina.net安家

一个人想着一个人 提交于 2020-03-01 07:48:45

git.oschina.net是oschina.net基于GitLab的在线代码托管平台,功能上类似于Github,我现在是拿这玩意托管笔记.

注册过oschina之后默认已经开启了git.oschina.net,第一次登陆git.oschina.net是会要求修改登录密码的,我的不知道为什么没有提示我修改,不过没关系,在登录的时候可以选择忘记密码,此时会向oschina账号绑定邮箱里发送一封密码重置邮件,点击之后就可以重设密码,我感觉这安全防护是不是有点太简陋了?

OK,重置之后先返回系统对git进行配置,我用的是Cmder自带的msysgit

 D:\Users\HOME\githome\lclfs (master)
 λ git --version
 git version 1.8.5.2.msysgit.0

上面的HOME目录是我在环境变量里面重定向了的,不然以我的经验看大多数应用会把HOME脑残地指向C盘.

git的初始化也是相当简单 git init

接下来配置ssh,生成公钥

 ssh-keygen -t rsa -C "youremail@xxx.com"

复制"C:\Users\wsk.ssh\id_rsa.pub"全部文本到"http://git.oschina.net/keys"上登记

在git.oschina.net建立一个项目"lclfs",测试下

 D:\Users\HOME\githome
 λ git clone git@git.oschina.net:introlisp/lclfs.git
 Cloning into 'lclfs'...
 The authenticity of host 'git.oschina.net (112.124.6.106)' can't be established.
 RSA key fingerprint is e3:ee:82:78:fb:c0:ca:24:65:69:ba:bc:47:24:6f:d4.

 Are you sure you want to continue connecting (yes/no)? yes
 Warning: Permanently added 'git.oschina.net,112.124.6.106' (RSA) to the list of known hosts.

 Enter passphrase for key '/c/Users/wsk/.ssh/id_rsa':
 remote: Counting objects: 3, done.
 remote: Total 3 (delta 0), reused 0 (delta 0)
 Receiving objects: 100% (3/3), done.
 Checking connectivity... done.

 D:\Users\HOME\githome
 λ cd lclfs\

 D:\Users\HOME\githome\lclfs (master)
 λ ls
 README.md

 D:\Users\HOME\githome\lclfs (master)
 λ vim README.md

 D:\Users\HOME\githome\lclfs (master)
 λ git push origin master
 Enter passphrase for key '/c/Users/wsk/.ssh/id_rsa':
 Everything up-to-date

 D:\Users\HOME\githome\lclfs (master)
 λ

鸣金收工.

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!