The authorized_keys of the git user cannot be directly pasted into the pubkey. . .
The authorized_keys file requires some additional instructions to ensure the normal working of git
What git server did you install? Read the instructions of git server carefully and redeploy the pubkey
You need to upload your own key. The method may be different depending on the git server. For example, in gitolite, the administrator needs to put the key you generated in the keydir directory of gitolite-admin
In your case, it should be an account problem. Please check the following method: create the git user on the git server and set a password, then chown the permissions of the git server directory to the git user, and finally su git使用git帐户登陆,并ssh-keygen生成.ssh目录,最后在启动git服务端!如果有web端,可以通过web方式加key,没有web端的要手动加入key到/home/git/.ssh/authorized_keys
It seems that the client of the question is on windows. The questioner tries to enable it Pageant并把相应的.ppk and add it. This tool should be included when TortoiseGit is installed.
Check if there is this stuff under your /home/git/.ssh/: authorzied_keys
Maybe it’s a permission issue?
There are many situations, but the information you gave is quite little
The authorized_keys of the git user cannot be directly pasted into the pubkey. . .
The authorized_keys file requires some additional instructions to ensure the normal working of git
What git server did you install? Read the instructions of git server carefully and redeploy the pubkey
You need to upload your own key. The method may be different depending on the git server. For example, in gitolite, the administrator needs to put the key you generated in the keydir directory of gitolite-admin
.ssh 700
authorized_keys 600
Check it and make sure the usernames are consistent
In your case, it should be an account problem. Please check the following method: create the git user on the git server and set a password, then chown the permissions of the git server directory to the git user, and finally
su git
使用git帐户登陆,并ssh-keygen
生成.ssh
目录,最后在启动git服务端!如果有web端,可以通过web方式加key,没有web端的要手动加入key到/home/git/.ssh/authorized_keys
It seems that the client of the question is on windows. The questioner tries to enable it
Pageant
并把相应的.ppk
and add it. This tool should be included when TortoiseGit is installed.Look at /etc/passwd to see if the corresponding shell for the git user is git-shell
When I first wrote no-longin, it prompted protocol error: bad line length character: This
When writing /usr/bin/git-login, I keep being prompted to enter the password, and no matter how I enter it, it is wrong.
It will be fine until it is changed to /usr/bin/git-shell.
Reset git password on the server: passwd git