The mobile phone uses Gidder to build a git server

Reference and download Gidder:
https://blog.csdn.net/TaylorPotter/article/details/69808733

Mobile phone installation apk, startup and related settings

insert image description here
Gidder default settings
insert image description here
Add user aaa
insert image description here
Add repository New Project
insert image description here
as repository New Project, specify user aaa: pull, push permissions
insert image description here
After all settings are complete, start the git service
insert image description here
Here you need to pay attention:

  • The newly created repository path is: /newProject.git
  • The IP address of the git server in the local area network: 192.168.1.6:2222

Local git project configuration

Configure the remote parameters of the local TortoiseGit project: ssh://username@IP address:port number/repository. git
insert image description here
here aaa is a remote alias, in order to retain the origin, submit and pull related commands through the alias

# 提交
git push aaa master

# 拉取
git pull aaa master

Possible errors and related handling

Unable to negotiate with 192.168.1.6 port 2222: no matching host key type found. Their offer: ssh-dss

The solution is to add a file: %USERPROFILE%.ssh\config
If the .ssh directory does not exist, you can use Git Bash (the MSysGit package that comes with Git for windows) to run

ssh-keygen -o

Then press Enter to use the default parameters. This is just to generate the .ssh directory. The id_rsa, pub and other files in it are not necessarily required. For details, please refer to: https://git-scm.com/book/zh/v2/server
.ssh\config created by -Git-Generate-SSH-Public Key above , its content is

HostkeyAlgorithms +ssh-dss

The authenticity of host xxx can’t be established.

Just enter yes to continue. For
details, please refer to: https://blog.csdn.net/qq_21480607/article/details/91845794

fatal: Could not read from remote repository.

When the connection and password are OK, an error still occurs

>git push aaa master
Password authentication
([email protected]) Password:
fatal: Could not read from remote repository.

Please make sure you have the correct access rights
and the repository exists.

It may be that the app on the mobile phone needs to read and write the memory card.
insert image description here
I have completed all the above settings here, and then re-created /newProject.git, and the submission can be successfully completed.
insert image description here

Guess you like

Origin blog.csdn.net/tangyin025/article/details/123561113