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
相关推荐
Serene_Dream1 小时前
git 合并冲突的分支
git
我是一只puppy2 小时前
使用AI进行代码审查
javascript·人工智能·git·安全·源代码管理
玄同7653 小时前
Git常用命令指南
大数据·git·elasticsearch·gitee·github·团队开发·远程工作
吠品3 小时前
命令行揭示SSL证书真相
https·github·ssl
、BeYourself4 小时前
解决git@github.com: Permission denied (publickey)
github
十步杀一人_千里不留行6 小时前
Git提交前ESLint校验实践(Husky + lint-staged)
git·github
朱昆鹏6 小时前
开源 Claude Code + Codex + 面板 的未来vibecoding平台
前端·后端·github
猫头虎8 小时前
OpenClaw-VSCode:在 VS Code 里玩转 OpenClaw,远程管理+SSH 双剑合璧
ide·vscode·开源·ssh·github·aigc·ai编程
礼拜天没时间.9 小时前
深入Docker架构——C/S模式解析
linux·docker·容器·架构·centos
hh随便起个名9 小时前
适合小白的git的基础使用方法
git