git_share
linux 环境(192.168.8.58)
1. 生成rsa key
$ ssh-keygen
如果你之前没有跑过这个文件, 接受默认选项即可。
这样你会在 ~/.ssh/下看到 id_rsa和id_rsa.pub
1.1 将id_rsa.pub的内容添加到 http://192.168.21.108:82/profile/keys中
注意由于id_rsa.pub文件较长, 可能打印成多行, 其实是一行。
2. 生成~/.ssh/config文件
3. 修改~/.ssh/config文件的权限为只能自己读写
$ chmod 600 ~/.ssh/config
4. 在~/.ssh/config中加入以下内容
Host gitlab
HostName 192.168.21.108
User git
Port 32
PubkeyAuthentication yes
RSAAuthentication yes
IdentityFile ~/.ssh/id_rsa
5. 告诉git你是谁。
git 是分布式管理系统, 没有一个统一的机构管理你的id, 你得自己告诉它
$ git config --global user.name wei.jia
$ git config --global user.email wei.jia@adchina.com
6. 让git给你点颜色看看, 否则看diff, status太累
$ git config --global color.ui true
$ git config --global color.status true
7. 在你的工作目录下执行:
git clone ssh://git@gitlab:32/data-team/sealion.git
8. 到sealion下工作
$ cd sealion
windows环境
1. 安装git
\\f\PD\Develop Tools\Git-1.9.5-preview20141217.exe
2. 启动git bash
3. 生成rsa key
$ ssh-keygen
接受所有默认选项即可
4. 将id_rsa.pub添加到http://192.168.21.108:82/profile/keys中
a. 用notepad打开刚创建的id_rsa.pub, Ctrl-A 选择全部, Ctrl-C复制
b. 在网页上点击 "Add SSH Key"
c. 将复制内容粘贴到key中, 然后点击“Add Key”
5. 在~/.ssh/config中加入以下内容, 如果这个文件不存在,请使用vim或notepad创建一个
Host gitlab
HostName 192.168.21.108
User git
Port 32
PubkeyAuthentication yes
RSAAuthentication yes
IdentityFile ~/.ssh/id_rsa
6. 告诉git你是谁。
git 是分布式管理系统, 没有一个统一的机构管理你的id, 你得自己告诉它
记得将命令中的贾玮的信息改成你的!!
$ git config --global user.name wei.jia
$ git config --global user.email wei.jia@adchina.com
7. 让git给你点颜色看看, 否则看diff, status太累
$ git config --global color.ui true
$ git config --global color.status true
8. 设置git bash到你的工作目录
8.1 在git bash下执行 $ cd /path/to/workdir/
8.2 或在/path/to/workdir 下执行右击 git bash
9. git clone ssh://git@gitlab:32/data-team/sealion.git
git_share的更多相关文章
随机推荐
- [转]eclipse github 提交代码
1 git add2 git commit3 git pull (会产生冲突) 分成自动合并和手动合并4 处理冲突的文件 5 git push 本次commit 我用的是Eclipse的插件EGit ...
- 使用LuaInterface遇到的编码问题
今天使用LuaInterface加载脚本时忽然报“未知字符”错误信息!于是检查文件编码 将其修改为“US ASCII” 就好了.
- [视频转换] C#VideoConvert视频转换帮助类 (转载)
点击下载 VideoConvert.zip 主要功能如下 .获取文件的名字 .获取文件扩展名 .获取文件类型 .视频格式转为Flv .生成Flv视频的缩略图 .转换文件并保存在指定文件夹下 .转换文件 ...
- mvc性能优化
mvc性能优化 (1)移动设备卡顿问题 -1请求方式 在mvc中GET请求有问题,出现错误 在MVC中在进行GET请求获取JSON数据时,需要进行如下设置: return Json("&qu ...
- PHP语言、浏览器、操作系统、IP、地理位置、ISP
)]; } else { $Isp = 'None'; } return $Isp; }}
- 常见 PL.SQL 数据库操作
Oracle PL/SQL 1, Alt +E 2, 默认大写功能, 解析SQL原则,Comment,UnComment. 3, 触发Trig,使用Test Window. 4, Compile In ...
- c#基础-----数据类型,转义字符,引用类型,类型转换
数据类型,转义字符,引用类型,类型转换 百度一下
- SVM(支持向量机)算法
第一步.初步了解SVM 1.0.什么是支持向量机SVM 要明白什么是SVM,便得从分类说起. 分类作为数据挖掘领域中一项非常重要的任务,它的目的是学会一个分类函数或分类模型(或者叫做分类器),而支持向 ...
- NLPIR.user Not valid license or your license expired! Please feel free to contact pipy_zhang@msn.com
NLPIR.user Not valid license or your license expired! Please feel free to contact pipy_zhang@msn.com ...
- [转] CSS3混合模式mix-blend-mode/background-blend-mode简介 ---张鑫旭
by zhangxinxu from http://www.zhangxinxu.com本文地址:http://www.zhangxinxu.com/wordpress/?p=4819 一.关于混合模 ...