add user email:XXXX@163.com username:XXXX( songfei)
Add Step:
System Server:
1. ssh 服务器用户名@10.4.65.XXX(远程服务IP) password XXXXX(服务器密码) ----通过ssh远程登录服务器
2. cd /home/XXXX/username/BSP
3. sudo cp wucaiyun.ldif songfei.ldif password XXXXX
4.change songfei.ldif
scp songfei.ldif 服务器用户名@10.4.65.XXX(远程服务IP):/home/XXXX
scp 服务器用户名@10.4.65.XXX(远程服务IP):/home/lXXXX/username/BSP/songfei.ldif ./
scp songfei.ldif 服务器用户名@10.4.65.XXX(远程服务IP):/home/XXXX/username/BSP
5.sudo ldapadd -x -D cn=admin,dc=example,dc=com -W -f songfei.ldif password:XXXX
6. log in 10.4.65.XXX(远程服务IP)
input username songfei password 123456
7.admin log to 10.4.65.XXX(远程服务IP)
People->list groups->add user to related branch
User Computer:
1.gerrit地址 http://10.4.XX.XXX:8080/ 帐号已经添加
user: songfei password: 123456
2.配置git user email
<1>sudo apt-get install git
<2>git config --global user.name "songfei"
<3>git config --global user.email "XXXX@163.com"
3.配置ssh
查看~/下是否有 .ssh目录 ls ~/.ssh
<1>如果没有,执行
ssh-keygen -t rsa -C "XXXX@163.com" --->执行完会在~下生成.ssh目录
<2>~/.ssh目录生成后 执行如下
echo "Host gerrit_sh" >> ~/.ssh/config
echo " HostName 10.4.65.XXX(远程服务IP)" >> ~/.ssh/config
echo " Port 29418" >> ~/.ssh/config
echo " User songfei" >> ~/.ssh/config
echo " IdentityFile ~/.ssh/id_rsa" >> ~/.ssh/config ----->id_rsa是~/.ssh下私钥的名字
4.gerrit上粘贴public key
浏览器打开http://10.4.XX.XXX:8080/ 点击右上角的Sign in->输入username password->点击右上角的用户名
->下拉框里Settings->左侧SSH public keys->将本机电脑上~/.ssh下的public key粘贴进去->add
5. 安装repo
repo init XXXX
repo sync