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 "xxx@xx.com"    //配置email   

测试是否连接成功

shell 复制代码
ssh -T git@github.com
相关推荐
qq2298734665 分钟前
LinkSwift 使用记录
github
MicrosoftReactor1 小时前
技术速递|在 GitHub Copilot App 中渲染超大型拉取请求
ai·github·copilot·虚拟化·拉取请求
SH的全栈笔记2 小时前
敲下 git add 的那一刻,.git 里多了什么
git·后端
miofly2 小时前
Gemini 4 Carbon发布:安全基准领先,幻觉率升至11%
开源·github
宁波阿成4 小时前
CentOS 7 环境下 Tomcat 8.5 升级至 9.0.123 操作总结
linux·centos·tomcat
科小怪4 小时前
万能文件格式转换器Filee下载安装全流程图解:255种格式离线转,不用装Office(2026最新)
github·格式转换·软件推荐·下载教程
徐小夕4 小时前
扒了JitWord的源码,我终于搞懂了企业级在线Word到底有多难写
前端·vue.js·github
maochongsandai1104 小时前
Centos上运行docker应用命令汇总
linux·docker·centos
正经教主5 小时前
【FDE系列】阶段2:Day 45(up详细版):综合实战 — Docker + Nginx + Git 完整部署与本周收官
人工智能·git·nginx·docker·fde
miofly5 小时前
GitHub 日榜趋势速报 | 2026-10-29
开源·github