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
相关推荐
想七想八不如114081 分钟前
【GitHub开源】一款基于 Python 的人脸识别 C/S 系统:YOLOv5 + PyQt5 + 批量入库
yolo·开源·github
夜珀19 分钟前
Git基础修炼手册:在AtomGit上玩转版本控制
git
CoderJia程序员甲29 分钟前
GitHub 热榜项目 - 日榜(2026-04-10)
人工智能·ai·大模型·github·ai教程
golang学习记33 分钟前
Zed IDE官宣新招:Git Graph 正式支持!
ide·git
辣椒酱.41 分钟前
github入门与实战
github
要记得喝水1 小时前
适用于 Git Bash 的脚本,批量提交和推送多个仓库的修改
git·elasticsearch·bash
捧月华如1 小时前
React vs Vue vs Angular:三大前端框架深度对比
python·github
AI_Claude_code1 小时前
专栏导论:开源项目贡献的价值与Git工作流全景图
git·开源
never forget shyang1 小时前
CCS20.2.0使用教程
c语言·git·单片机
研究点啥好呢9 小时前
Github热门项目推荐 | 创建你的像素风格!
c++·python·node.js·github·开源软件