1.检查是否已经有SSH Key。

$ cd ~/.ssh

2.生成一个新的SSH。

$ ssh-keygen -t rsa -C "email"

3.添加ssh key到GitHub/GitLab
在GitHub/GitLab上找到关于SSH keys->add key把id_rsa.pub公钥的内容复制进去就可以了。

4.配置账户

$ git config --global user.name “your_username” #设置用户名

$ git config --global user.email “your_registered_github_Email” #设置邮箱地址(建议用注册giuhub的邮箱)

5.最后一步测试是否成功:

ssh -T git@"你的gitlab服务器地址"

相关文章:

  • 2021-06-28
  • 2021-12-11
  • 2021-09-12
  • 2021-04-02
  • 2022-01-01
  • 2022-02-17
  • 2021-06-01
猜你喜欢
  • 2021-04-03
  • 2021-07-25
  • 2021-09-15
  • 2021-05-22
  • 2022-12-23
相关资源
相似解决方案