Git configuration for Android development
1. First GIT configuration:
Enter the command:
git config--global user.name "xxx.xx"
git config--global user.email "[Email protected]"
git config--global commit.template "/home/xxx/commit.template"
Change the name to your own.
You can see whether the command is configured via git config--global--list:
user.name=xxx.xx
[Email protected]
Commit.template=/home/xxx/commit.template
2. Configure SSH:
Enter the command:
Ssh-keygen
Then all the way back to the end, to the root directory in the. SSH folder,
Enter the command:
Touch Config
Create a new config file and add the following:
Host 192.168.10.x
User xxx.xx
Port 29418
Identityfile ~/.ssh/id_rsa
Host 192.168.10.xx
User xxx.xx
Port 29418
Hostname 192.168.10.xx
Identityfile ~/.ssh/id_rsa
Host 192.168.10.xxx
User xxx.xx
Port 29418
Hostname 192.168.10.xxx
Identityfile ~/.ssh/id_rsa
Don't forget to modify user.
Copy all of the contents of the id_rsa.pub to the Gerrit, and the above three servers will have to add SSH public Keys. Enter the address of the host behind the browser to log on to the server if no account is registered on the server.
SSH Public keys location in setting:
Click Add key to copy the copied content, as follows:
Click Add to be OK.
Back to the server, repo code will appear when prompted, enter Yes to return.
Git configuration for Android development