Cloud code (gitee) arranged ssh key

Create a public purpose of:

Use SSH public key allows you to use a secure connection when your PC and the cloud code communications (git to use the remote SSH address)

git Right-click and select Paste Paste

step:

  1. Open Terminal (git) into the .ssh directory

    • Entry cd ~/.ssh

      17559159-3ad38cd63020ccf7.JPG
      Enter ssh

    • If the .ssh folder does not exist, execute commands automatically create mkdir ~/.ssh(I have created, so do not use this command)

  2. RSA key pair generation

    • ssh-keygen -t rsa -C "your mailbox @ xxx.com"


      17559159-10e3cc37696850f7.JPG
      Generate a key pair
  3. Check the contents of the public key

    • cat ~/.ssh/id_rsa.pub


      17559159-8ee1360acd7395af.JPG
      View key
  4. The (entire) Copy and paste the contents of the public key (Note: the contents of the public key to ssh-rsa beginning)

  5. Tested public key (link test SSH) is added after the completion of the public key

    • ssh -T [email protected]
    • When the terminal prompts welcome to Gitee.com, yourname! Indicates a successful link


      17559159-6f143e297383c4ee.JPG
      Link success

So far in the future as long as ssh copy link address, you can then use git commands related operations!

Reproduced in: https: //www.jianshu.com/p/416ac815b2b1

Guess you like

Origin blog.csdn.net/weixin_34304013/article/details/91256834