gitlab使用说明

这是gitlab搭建起来后,为团队内部写的简单配置说明。

Step1: Use ssh-keygen to generate a new pair of id_rsa_new / id_rsa_new.pub

1
2
cd ~/.ssh
ssh-keygen -t rsa -C "tanhao2013@foxmail.com" # your email

step1

Step2: Add the ssh key to the gitlab

1
cat gitlab_rsa.pub

step2

Step3: Modify youy ~/.ssh/config

step3

Step4: Testing

1
2
3
4
5
6
ssh-agent bash
ssh-add ~/.ssh/gitlab_rsa
# Input the password you set at step1
# Enter passphrase for /root/.ssh/gitlab_rsa:
# Identity added: /root/.ssh/gitlab_rsa (/root/.ssh/gitlab_rsa)
ssh -T git@gitlab.mudan.com

Step5: Use it

1
2
3
cd workdir
git config --global user.name "tanhao"
git config --global user.email "tanhao2013@foxmail.com"
1
2
3
4
5
6
7
8
mkdir test
cd test
git init
touch README.md
git add README.md
git commit -m "first commit"
git remote add origin ssh://git@*.*.*.*:1020/tanhao/test.git
git push -u origin master

Step6: Windows 下使用方法

http://www.showerlee.com/archives/1300

Step7:Eclipes 使用方法

http://blog.csdn.net/luckarecs/article/details/7427605

Step8: 多人协作及WorkFlow

http://herry2013git.blog.163.com/blog/static/219568011201341111240751/
http://www.liaoxuefeng.com/wiki/0013739516305929606dd18361248578c67b8067c8c017b000/0013760174128707b935b0be6fc4fc6ace66c4f15618f8d000

References

http://www.kuqin.com/shuoit/20141213/343854.html
http://www.2cto.com/os/201402/281792.html
http://www.cnblogs.com/BeginMan/p/3548139.html
http://my.oschina.net/csensix/blog/184434

Comments