SSH and git public/private keys in Ubuntu

Source: Internet
Author: User
Today, git is used. Everything works normally on windows, but after installing git on Ubuntu, the following problems occur:

The sudo ssh-T git@github.com prompts permission denied (publickey ).Sudo git clone git@github.com: xiaomu/xmsc. Git prompt: Permission denied (publickey ).
Fatal: the remote end hung up unexpectedly but the ssh-T git@github.com is successfully executed while "Git clone git@github.com: xiaomu/xmsc. Git" not in ~ /Directory, The sudo write permission is required According to the analysis, the public and private keys generated by using the ssh-keygen command are stored in the current user ~ /. In the ssh/directory, but when using the sudo command, it is to go to/root /. SSH/to find the corresponding file, so the verification fails. Solution: 1) copy to the corresponding file; 2) use sudo ssh-keygen to generate;

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.