1. How to install and configure git.
Gitlab server IP: https://gitlab.apac.irdeto.com/
从左上角图标中现则Help-> User documentation->SSH(https://gitlab.apac.irdeto.com/help/ssh/README)
Or
从右上角选择Profile Settings-> SSH Keys, you can click “generate it” to see the help file.
1) Generate keys
Cd destpath
ssh-keygen -t rsa -C “jia.suhua@irdeto.com”
it will be save to current path ~/.ssh/id_rsa.pub, when prompted for the location and filename, just press enter to use the default.
2) Copy the key value to clip
cat ~/.ssh/id_rsa.pub | clip
3) Add the key to the project on gitlab server
In Gitlab server web url, 左上角选择Profile Settings, then select “SSH Keys”, paste the keys to it and fill the title, finally click “Add key” button.
4) Clone一个仓库
In Gitlab server web url, 左上角选择Projects-> Your Projects->ST/IMS, then you will find there is a dropdown list, you can select SSH/HTTPS, you select SSH, then copy the value in the near textbox(git@gitlab.apac.irdeto.com:st/ims.git).
在默认情况下,Git会把"Git URL"里目录名的'.git'的后辍去掉,做为新克隆(clone)项目的目录名: (例如. git clone http://git.kernel.org/linux/kernel/git/torvalds/linux-2.6.git 会建立一个目录叫'linux-2.6')
You can use Git command on your test client to clone the project.
1: CD to your working directory,
2 execute: git init
3 execute: git clone git@gitlab.apac.irdeto.com:st/ims.git
4.Git config:
Git config --global user.name jiasuhua
Git config --global user.email iia.suhua@irdeto.com
Git config --global color.ui true
You can use following commands to check it.
Git config --list
Cat ~/.gitconfig
Or You can just use PYCHARM to load the project the git server with address git@gitlab.apac.irdeto.com:st/ims.git
5) Switch branches
Using git branch to show the branch status
Using git checkout XXX to switch to the specified branch.
Login:
CORP
UserName: jia.suhua
Password: windows login password
浙公网安备 33010602011771号