Git submits to its own server and must enter the password every time.

  git, question

I have a cloud server, and I have installed git on it and built git server according to the network method.

The problem now is, I install msysGit on my computer, submit the code, and need to enter git’s password. (I did not know the password for the first time, and then I changed the git password on the cloud server). After entering the correct password, I can log in and use git normally.

I connect git@localhost to the root user on the cloud server, which is the same. You must enter a password to give git push pull and other functions.

I am hereLocal windows computerAndCloud server root userThe push-pull code of github.com can be normally connected on the computer.

So, the feeling is stillThere is a problem with git@ cloud server settings.

The following two pictures are both of the git server on the remote server root account:

Figure 1 is a password required for login
图片描述

Figure 2 shows the permissions of /home/git/.ssh/authorized_keys
图片描述

Please give us specific instructions!

Update:
Finally, referring to a post on this website, we have solved the problem and can refer to it if necessary.
http://segmentfault.com/q/1010000000691963

Thank you for answering the questions. Thank you, thank you! ! !

Two methods:

  • Ssh, then the url will be connected to git @ 192.168.0.200: weitoo/server-aggregator.git Since you have configured sshkey, then the url will go through the ssh protocol
  • url

$ git config –global user.name “your name”
$ git config –global user.name “your name”$ git config –global user.email “your_email@youremail.com”
(4) enter the warehouse to be uploaded, right click git bash and add remote address:
$ git remote add origin git@github.com:yourName/yourRepo.git

Once you enter the password, you don’t need to enter it again. It will be saved automatically.