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
相关推荐
1379003408 小时前
Git 设置代理
git
eaglesstone8 小时前
centos 9 时间同步服务
linux·运维·centos
Web极客码10 小时前
WordPress“更新失败,响应不是有效的JSON响应”问题的修复
json·github·wordpress
xiaodunmeng15 小时前
sourcetree gitee 详细使用
git
是懒羊羊吖~15 小时前
图床 PicGo+GitHub+Typora的下载安装与使用
经验分享·笔记·github·typora·picgo
LostSpeed16 小时前
git,gitea - tool - creat Gitea Empty Rep Dir
git·gitea
前端郭德纲18 小时前
vscode默认终端怎么设置成git bash
git·vscode·bash
lj9077226441 天前
CentOS环境搭建DeepSeek本地知识库
linux·运维·ai·centos
近听水无声4771 天前
git 学习(基于Ubuntu和gitee)
git
chde2Wang1 天前
yum下载报错Could not resolve host: mirrorlist.centos.org; Unknown error
linux·运维·centos