Fork me on GitHub
Suzf  Blog

How-to start my first project on GitLab

License: Attribution-NonCommercial-ShareAlike 4.0 International

本文出自 Suzf Blog。 如未注明,均为 SUZF.NET 原创。


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][zfsu@lucy ~]$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




「一键投喂 软糖/蛋糕/布丁/牛奶/冰阔乐!」

Suzf Blog

(๑>ڡ<)☆ 谢谢 ~