安装
sudo apt-get install update
sudo apt-get install git
配置
git config --global user.name username
git config --global user.email username@company.com
git config --global core.editor vim
查看配置:git config --list
或者打开cat .gitconfig
可以看到
[user]
name = username
email = username@company.com
[core]
editor = vim
ssh配置
sudo apt-get install ssh (如果没有的话)
ssh-keygen -t rsa -C "email address"
gedit ~/.ssh/id_rsa.pub
gerrit右上角 登陆后点击settings->SSH and GPS keys->New SSH key
将id_rsa.pub文件中的内容全部复制到key中,输入title,点击Add SSH key 即可。
repo安装
$ mkdir ~/bin
$ curl https://mirrors.tuna.tsinghua.edu.cn/git/git-repo > ~/bin/repo
$ chmod a+x ~/bin/repo
$ sudo apt-get install openjdk-8-jdk
$ echo export JAVA_HOME="/usr/lib/jvm/java-8-openjdk-amd64/">> ~/.bashrc
$ source ~/.bashrc
python3 安装