Install and config Git
install git
1 | sudo apt-get install git |
config git
1 | git config --global user.name "Your Name" |
1 | git config --global user.email "your.email@gmail.com" |
Note:”Your Name” must be same with your domain name, for example wei.cheng
Check config information
1 | git config --list |
Generate and upload ssh key
On Linux
1 | ssh-keygen -t rsa -C "your.email@gmail.com" |
Don’t use any passphrase
1 | vim ~/.ssh/config |
1 | ---------------------------------------------------------------- |
1 | cat ~/.ssh/id_rsa.pub |
Copy the whole file into clipboard
Open gerrit website , On website, goto “Settings -> SSH Public Keys”, paste the key, press “Add”
Clone projects
1 | git clone <ssh://your.name@gerrit.ai.bmfusion.net:29418/xxx.git> |