Fork me on GitHub
Suzf  Blog

Tag GitLab

How-to use Jenkins and GitLab to build Continuous Integration

环境: Jenkins + GitLab + Maven + Tomcat

主要实现自动构建部署 Java Web应用。


提交代码到 GitLab --> Jenkins触发构建任务 --> Maven编译打包 --> Jenkins将war包部署到Tomcat。 安装 GitLab 安装 Jenkins 安装  Maven & JDK 安装 Plugins Publish over SSH

How-to start my first project on GitLab

1. login as Administrator and create  test group/project/user

create test group - test create test user   - test change test user to test group and change `Project access` role to owner create a demo project -- -- Visibility Level can chose public for test at the end, click Create project button

2. use the test user - test login and and an SSH key

click avatar img --> profile setting --> SSH keys on linux git client generate a ssh key for gitlab

cd $HOME
ssh-keygen -t rsa -C "[email protected]" -f .ssh/gitlab_rsa

reslove multi ssh key issue

cat  >> $HOME/.ssh/config << EOF
    IdentityFile ~/.ssh/gitlab_rsa
    User git
    Port 22

paste the ssh keys public public, the example file is .ssh/ now `cat  .ssh/` and then copy the output to Key area. set up an title for this ssh key.

3. test the git connection

^_^[15:49:55][[email protected] ~]$ssh -T Welcome to GitLab, zfsu!

4. checkout and commit

Git global setup

git config --global "Administrator"
git config --global "[email protected]"

Create a new repository

git clone [email protected]:test/demo.git
cd demo
git add
git commit -m "add README"
git push -u origin master

Existing folder or Git repository

cd existing_folder
git init
git remote add origin [email protected]:test/demo.git
git add .
git commit
git push -u origin master




How-to quick install GitLab via omnibus

由于 The Geate Wall 过于强大,有些时候不得不科学上网。 通过 rubygems & 官方 omnibus 也会出现种种问题。 踩坑无数,喜出望外的是发现了 清华大学 TUNA 镜像源 [] # cat /etc/issue Ubuntu 16.04.1 LTS 这里以 Ubuntu 16.04.1 LTS 为例 其他版本可自行到 tsinghua tuna mirror 查看 首先信任 GitLab 的 GPG 公钥: