1、在windows上安裝git客戶端? ??
?1.1下載git客戶端?
1.2?在windows上安裝git客戶端?
2、在windows上安裝python? ??
注 安裝時(shí)不要忘記在環(huán)境變量Path添加Python的路徑,需要添加Python路徑以及Pyrhon下Scripts的路徑,否則會(huì)遇到 gir review is not a command的錯(cuò)誤
3、在windows上安裝git-review??
3.1 下載git-review? ??下載地址為:https://pypi.python.org/pypi/git-review/? ??
3.2? 若為內(nèi)網(wǎng)安裝,git review? 可以手動(dòng)替換?site-packages目錄下的內(nèi)容
3.3 安裝git-review,解決下載的tar.gz包,并執(zhí)行命令 pyhon setup.py install
4、git config配置
? git-review安裝完成后,在MINGW64中執(zhí)行如下命令以對(duì)git config進(jìn)行配置。
git config --global?user.name?“${user_name}”# gerrit中相應(yīng)的用戶名
git config --global user.email?“${user_email}”?# 用戶對(duì)應(yīng)的郵箱地址,一般為user_name@xxx.com
git config --global core.editor vim
git config --global merge.tool vimdiff
git config --global gitreview.username “${user_name}”# gerrit中相應(yīng)的用戶名,一般與user.name一致
查看 git config中參數(shù)的命令為?git config --global -l 查看用戶配置
5、公鑰配置
使用ssh-keygen.exe在windows上生成公鑰和私鑰(存放位置一般為/c/Users/xxxxxx/.ssh/),可以一路enter
?把公鑰的內(nèi)容拷貝到gerrit的Settings->SSH Public Keys中