日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 编程资源 > 编程问答 >内容正文

编程问答

GIT SSH配置已有秘钥

發(fā)布時間:2024/1/18 编程问答 45 豆豆
生活随笔 收集整理的這篇文章主要介紹了 GIT SSH配置已有秘钥 小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.

1.確保SSH已經(jīng)安裝

sudo apt-get install openssh-server

2.確保HOSTS有g(shù)ithub.com

127.0.0.1 localhost 127.0.1.1 ubuntu 20.205.243.166 github.com # The following lines are desirable for IPv6 capable hosts ::1 ip6-localhost ip6-loopback fe00::0 ip6-localnet ff00::0 ip6-mcastprefix ff02::1 ip6-allnodes ff02::2 ip6-allrouters

3.把公私鑰放進~/.ssh后

xzj@ubuntu:~$ ssh -T git@github.com The authenticity of host 'github.com (20.205.243.166)' can't be established. ECDSA key fingerprint is SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM. Are you sure you want to continue connecting (yes/no/[fingerprint])? yes Warning: Permanently added 'github.com,20.205.243.166' (ECDSA) to the list of known hosts. Hi xzj19940819! You've successfully authenticated, but GitHub does not provide shell access.

注意這個fingerprint,如果對不上的話可能是HOSTS沒有配置好,我這里是ECDSA算法的

These are GitHub's public key fingerprints:SHA256:nThbg6kXUpJWGl7E1IGOCspRomTxdCARLviKw6E5SY8 (RSA) SHA256:p2QAMXNIC1TJYWeIOttrVc98/R1BUFWu3/LiyKgUfQM (ECDSA) SHA256:+DiY3wvvV6TuJJhbpZisF/zLDA0zPMSvHdkr4UvCOqU (Ed25519)

其他問題參考官方:

Authentication - GitHub Docs

其他流程:

  • Copy the SSH public key to your clipboard.

    If your SSH public key file has a different name than the example code, modify the filename to match your current setup. When copying your key, don't add any newlines or whitespace.

    $ cat ~/.ssh/id_ed25519.pub # Then select and copy the contents of the id_ed25519.pub file # displayed in the terminal to your clipboard

    Tip:?Alternatively, you can locate the hidden?.ssh?folder, open the file in your favorite text editor, and copy it to your clipboard.

  • In the upper-right corner of any page, click your profile photo, then click?Settings.

  • In the "Access" section of the sidebar, click??SSH and GPG keys.

  • Click?New SSH key?or?Add SSH key.

  • In the "Title" field, add a descriptive label for the new key. For example, if you're using a personal Mac, you might call this key "Personal MacBook Air".

  • Paste your key into the "Key" field.

  • Click?Add SSH key.

  • If prompted, confirm your GitHub password.

  • 總結(jié)

    以上是生活随笔為你收集整理的GIT SSH配置已有秘钥的全部內(nèi)容,希望文章能夠幫你解決所遇到的問題。

    如果覺得生活随笔網(wǎng)站內(nèi)容還不錯,歡迎將生活随笔推薦給好友。