一、设置Git的 user.name 和 user.email :(如果是第一次的话)

$ git config --global user.name "用户名"

$ git config --global user.email "邮箱地址"

 修改用户名或者邮箱地址:

$  git config --global --replace-all user.name "用户名"

$  git config --global --replace-all user.email "邮箱地址" 

删除用户名或者邮箱地址: 

$ git config --global --unset user.name "用户名"
$ git config --global --unset user.email "邮箱地址" 

查看已经配置的信息:

git config --list

Git-ssh 配置及使用 

二、生产 ssh **

$ ssh-****** -t rsa -C "[email protected]

 连续3个回车。如果不需要密码的话。
最后得到了两个文件:id_rsaid_rsa.pub

Git-ssh 配置及使用

进入到  .ssh 文件夹下,该文件夹是隐藏文件。

执行  ls -al   命令查看文件夹中的内容:

Git-ssh 配置及使用

打开 id_rsa.pub文件的到**:

cat id_rsa.pub

Git-ssh 配置及使用

相关文章:

  • 2021-09-04
  • 2021-08-19
  • 2021-09-29
  • 2022-02-04
  • 2021-08-09
  • 2021-06-06
  • 2022-01-20
  • 2021-05-29
猜你喜欢
  • 2021-06-25
  • 2021-09-21
  • 2021-11-21
相关资源
相似解决方案