centos 配置 git 连接 github

centos 配置 git 连接 github

  1. 首先安装 git

  2. 创建 ssh key

    shell 复制代码
    ssh-keygen -t rsa
  3. 复制公钥

    shell 复制代码
    cat ~/.ssh/id_rsa.pub # 打印出公钥内容然后复制
  4. 配置 github

    1. 登录网页 github 账号;
    2. 进入 setting;
    3. 点击 SSH and GPG keys,点击 New SSH key
    4. titile 随便填,把刚才复制的公钥填到 Key 里
  5. 在 centos 上配置 github 账号

    shell 复制代码
    git config --global user.name "xxxx"   //配置用户名
    git config --global user.email "[email protected]"    //配置email   

测试是否连接成功

shell 复制代码
ssh -T [email protected]
相关推荐
qianmoQ2 小时前
GitHub 趋势日报 (2025年05月11日)
github
Yvonne爱编码3 小时前
HTML-3.3 表格布局(学校官网简易布局实例)
前端·html·github·html5·hbuilder
默心5 小时前
centos7部署mysql5.7
linux·运维·mysql·centos
范纹杉想快点毕业7 小时前
以项目的方式学QT开发(一)——超详细讲解(120000多字详细讲解,涵盖qt大量知识)逐步更新!
c语言·数据结构·c++·git·qt·链表·github
qq_653644469 小时前
如何查看打开的 git bash 窗口是否是管理员权限打开
开发语言·windows·git·bash
tonngw9 小时前
【Mac 从 0 到 1 保姆级配置教程 12】- 安装配置万能的编辑器 VSCode 以及常用插件
git·vscode·后端·macos·开源·编辑器·github
八股文领域大手子10 小时前
HTTP/1.1 host虚拟主机详解
github
唐志远199711 小时前
VMware虚拟机 安装 CentOS 7
linux·运维·centos
橄榄熊11 小时前
Git 常用命令详解
git
HORSE RUNNING WILD14 小时前
解决 PicGo 上传 GitHub图床及Marp中Github图片编译常见难题指南
css·python·github