Install LinuxMint13 and access git without a password

Source: Internet
Author: User

LinuxMint13 installation without a password access git the following is the step record for installing Gitolite on LinuxMint13: 1. on the server side, create a git account: sudo adduser -- system -- shell/bin/bash -- group git sudo adduser git ssh sudo passwd git 2. on the server side, install open-ssh and configure ssh. To enable password-free login for the Git account, we need to modify the/etc/ssh/sshd-config file. modify PermitRootLogin no to yes PubkeyAuthentication to no AuthorizedKeysFile. add # block before ssh/authorized_keys, set PasswordAuthentication to yes, and then run the following command to restart ssh: sudo service ssh Restart 3. on the client, use ssh-key-gen to create the public key and key. The command is as follows: ssh-keygen-t rsa 4. ssh-copy-id copies the public key from the client to the remote host. Here I use a computer's skwiki user to copy it to the git User: skwiki @ HaSee $ ssh-copy-id-I ~ /. Ssh/id_rsa.pub git @ localhost at this time, the password is required. Enter the git password to submit the file. After submission, the file is at/home/git/on the server /. the ssh/authorized_keys file already contains the id_rsa.pub public key content. Later gitolite will also involve the modification of authorized_keys. 5. modify the/etc/ssh/sshd-config file again. modify PermitRootLogin no to yes RSAAuthentication to no PubkeyAuthentication to yes AuthorizedKeysFile. add # block before ssh/authorized_keys, set PasswordAuthentication to no, and then run the following command to restart ssh: sudo service ssh restart 6. log on to the git host on the client. Both my client and server are on a computer, so use the localhost flag. Ssh git @ localhost note that PasswordAuthentication and PubkeyAuthentication can be set to yes at the same time.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.