xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

GitHub SSH key

GitHub SSH key

https://help.github.com/en/github/authenticating-to-github

steps

HTTPS clone !== SSH clone

https clone bug

SSH clone OK

testing

step 0. Checking for existing SSH keys

check

$ ls -al ~/.ssh

# id_rsa.pub
# id_ecdsa.pub
# id_ed25519.pub

$ cat ~/.ssh/id_rsa.pub

$ cat ~/.ssh/id_rsa

https://help.github.com/en/github/authenticating-to-github/checking-for-existing-ssh-keys

step 1. Generating a new SSH key

create

$ ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

https://help.github.com/en/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent

https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account

step 2.

add

https://help.github.com/en/github/authenticating-to-github/adding-a-new-ssh-key-to-your-github-account

https://github.com/settings/ssh/new

step .3

将 SSH 密钥添加到 ssh-agent

zh-Hans

https://help.github.com/cn/github/authenticating-to-github/generating-a-new-ssh-key-and-adding-it-to-the-ssh-agent


$ eval "$(ssh-agent -s)"
# 修改 ~/.ssh/config 文件以自动将密钥加载到 ssh-agent 中并在密钥链中存储密码。

Host *
  AddKeysToAgent yes
  UseKeychain yes
  IdentityFile ~/.ssh/id_rsa


$ ssh-add -K ~/.ssh/id_rsa

step 4.test

$ ssh -T git@github.com

OK 👌


GPG key

https://help.github.com/articles/generating-a-gpg-key/


posted @   xgqfrms  阅读(209)  评论(21编辑  收藏  举报
编辑推荐:
· AI与.NET技术实操系列(二):开始使用ML.NET
· 记一次.NET内存居高不下排查解决与启示
· 探究高空视频全景AR技术的实现原理
· 理解Rust引用及其生命周期标识(上)
· 浏览器原生「磁吸」效果!Anchor Positioning 锚点定位神器解析
阅读排行:
· DeepSeek 开源周回顾「GitHub 热点速览」
· 记一次.NET内存居高不下排查解决与启示
· 物流快递公司核心技术能力-地址解析分单基础技术分享
· .NET 10首个预览版发布:重大改进与新特性概览!
· .NET10 - 预览版1新功能体验(一)
历史上的今天:
2019-03-26 Fetch delete API & HTTP Methods All In One
2016-03-26 Windows 10 系统下的 shutdown 命令大全 All In One
2016-03-26 How to reset your password in Ubuntu x64!
2016-03-26 从GitHub Jobs! 看技术发展趋势! 程序员进阶必备!
点击右上角即可分享
微信分享提示