1. Gerrit username and password
By default, Gerrit usernames are all in lowercase, for example, quanshui.
Password: quan1234
2. Configure the server IP Address
Because securecrt is used to connect to the remote service, users generally do not have the permission, so the Linux administrator needs to configure
Host
Related commands: vi etc/hosts
Add the following content:
Server IP (e.g. 192.168.3.23) servertest
3. Configure the Gerrit server ing
Cd ~
Mkdir. SSH
Vi. Ssh/config
Add the following content
Host servertester
User quanshui
Port 29418
Hostname servertest
Identityfile ~ /. Ssh/id_rsa
Explanations:
Host is the name of the server to be accessed through SSH.
The user is the Gerrit user name.
Port is a port and must be 29418
Hostname is the server configured in hosts.
Identityfile is the verification public key to be generated
4. generate an SSH key
Enter ssh-keygen-r RSA under securecrt
There will be a default storage address, or you can re-write the address, but it must be consistent with the identityfile address in step 1
It also sets the password when the key is obtained.
Then run: SSH-add
5. Configure on the Gerrit webpage
Enter the user name and password to go to the settings option interface,
Configure the Public Key (generated just now)
Configure the mailbox. Generally, the prefix is the same as the user name. If it is different, run:
Git config -- Global Review. "servertest/Gerrit/". username "Your Gerrit account name"
6. log on to the email address for email verification. You should receive a verification URL and click it.
7. Run the test connection: git servertester
**** Welcome to Gerrit Code Review **** Hi quanshui, you have successfully connected over SSH. Unfortunately, interactive shells are disabled. To clone a hosted Git repository, use: git clone ssh: //quanshui@servertest:29418/REPOSITORY_NAME.git Connection to servertest closed. |
8.
Now, the Gerrit account configuration is complete. You can download and submit the Code through the Gerrit server.