简体   繁体   中英

Adding an SSH Key to Github from Git

I am trying for the first time to add a recently created SSH key from Git on windows to Git-hub. When entering "$ SSH -T git@github.com" into Git it pops up with a key fingerprint and I dont recognize what its listed as. Sorry but this is my first time doing this. All it says is "ED2219 key fingerprint is (I dont' recognize the part that comes after.'"

Its is asking me if I want to continue with options (yes/no/[fingerprint])? I have not tried any solutions to my issue.

Add the SSH key to your GitHub account

# Copies the contents of the id_ed25519.pub file to your clipboard
 clip < ~/.ssh/id_ed25519.pub

Tip: If clip isn't working, you can locate the hidden .ssh folder in C:/../User/.ssh , open the file in your favorite text editor, and copy it to your clipboard.

在此处输入图像描述

Testing your SSH connection

    ## Attempts to ssh to GitHub
    $ ssh -T git@github.com
    ## output
    > The authenticity of host 'github.com (IP ADDRESS)' can't be established.
    > Ed25519 key fingerprint is SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU
    > Are you sure you want to continue connecting (yes/no)?
  • Compare if your fingerprint (in this example SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU ) is the same as one of the GitHub's SSH key fingerprints
    if so then continue with yes
# Output
Hi USERNAME! You've successfully authenticated,
        but GitHub does not provide shell access.

If you have the same output, then all is well, and you should be able to use shh with GitHub

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM