git 生成密钥与github连接

在GitHub上设置SSH输出密钥的步骤如下:

1.在命令行中生成SSH密钥对:

复制代码
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"

按照提示完成密钥生成,通常会将密钥存储在~/.ssh/id_rsa(私钥)和~/.ssh/id_rsa.pub(公钥)。

2.在GitHub上添加SSH密钥:

  • 登录GitHub账户。

  • 点击右上角的用户头像,选择"Settings"。

  • 在用户设置页面的侧栏中点击"SSH and GPG keys"。

  • 点击"New SSH key"或"Add SSH key"按钮。

  • 在"Title"字段中,可以填写一个描述性的标题。

  • 在"Key"文本框中,粘贴~/.ssh/id_rsa.pub文件的内容。

  • 点击"Add SSH key"按钮完成添加。

相关推荐
ll5776443322 小时前
使用PyTorch实现自定义损失函数以FocalLoss为例的详细教程
git
李少兄3 小时前
Git 用户名与邮箱配置指南
git
Blue啊3 小时前
code Merge(qcc)
git·gitlab
逛逛GitHub4 小时前
推荐 3 个 GitHub 开源项目,让你的 Claude Code 与众不同。
github
whysqwhw6 小时前
KSP 全面讲解
github
whysqwhw7 小时前
KotlinPoet 详解
github
洛小豆8 小时前
Git打标签仓库看不到?她说:豆子,你又忘了加 --tags!
git·后端·github
不老刘8 小时前
GitHub Spec-Kit:AI 时代的规范驱动开发工具
人工智能·github·spec-kit
piggy侠8 小时前
【GitHub每日速递 251016】23k star,Daytona:90ms内极速运行AI代码,安全弹性基础设施来袭!
算法·github
CoderJia程序员甲9 小时前
GitHub 热榜项目 - 日榜(2025-10-15)
ai·开源·大模型·github·ai教程