Win10下的Linux子系统使用——充当Gerrit服务器
- 子系统安装
- Linux子系统搭建Gerrit
- Window下登录Gerrit网页,并申请新的使用者账号
- 遇到的一些问题
-
- 1、登录Gerrit网页时,报错:Service Unavailble...”
- 2、在Windows系统下用使用者账号远程克隆文件时,走**http**协议可成功clone,但走**ssh** clone时报错“user_1@localhost: Permission denied (publickey). fatal: Could not read from remote repository. Please...”
- 3、在Windows下使用者账号git push代码时报错:“remote: ERROR: commit c113208: email address user_12022@126.com is not registered in your account, and you lack 'forge committer' permission.”
子系统安装
微软开发了适用于 Linux 的 Windows 子系统,称为 WSL。据说…为了使用linux子系统,win10版本应当为 1709 或者最新版。如果版本低,就需要升级。
1、点击桌面任务栏上的搜索窗口,在搜索窗口中输入“控制面板” --> “程序 ” --> “启用或关闭Windows功能” --> “适用于Linux的Windows子系统”打勾确定。
2、重启电脑,打开Microsoft store,搜索“Linux”(如Ubuntu 18.04 LTS)安装。启动Linux子系统,输入“lsb_release -a”可查看系统版本信息。
helen@LAPTOP-QE532:~$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.5 LTS
Release: 18.04
Codename: bionic
helen@LAPTOP-QE532:~$
Linux子系统搭建Gerrit
此处狗蛋用来记录流程和命令了,详情请参考网友资源https://blog.youkuaiyun.com/yehe111/article/details/109487672
A、前置条件
1、Ubuntu新增gerrit账号
sudo adduser gerrit \\增加gerrit管理账号
sudo usermod -a -G sudo gerrit \\给gerrit账号分配管理员权限
sudo su gerrit \\切换到gerrit账号
2、Ubuntu安装java环境
sudo add-apt-repository ppa:openjdk-r/ppa
sudo apt-get u