1、配置用户和邮箱

$ git config --global user.name "your_name"

$ git config --global user.email "your_email@example.com"

2、生成新的公钥
ssh-keygen -t rsa -b 4096 -C "your_email@example.com"


2.gitlab将http更换为ssh方式
首先删除本地的私钥文件,才能够配置新的ssh
(1). 删除原服务端
git remote remove origin

或重命名原有服务端名称

git remote rename origin old-origin

(2). 添加新目标服务端地址
git remote add origin 自己仓库的ssh地址

相关文章:

  • 2021-11-20
  • 2022-12-23
  • 2021-09-04
  • 2022-03-09
  • 2021-09-12
  • 2021-12-31
  • 2022-12-23
  • 2022-12-23
猜你喜欢
  • 2021-06-20
  • 2021-06-22
  • 2021-06-26
  • 2021-07-28
  • 2022-12-23
  • 2021-04-08
  • 2022-01-02
相关资源
相似解决方案