1. 用户名,这个名字会出现在以后的提交记录中。 
    git config --global user.name "Git@OSC用户名"

  2. 然后是Email,同样,这个Email也会出现在你的提交记录中,此Email要与Git@OSC的注册Email一致。 
    git config --global user.email "Git@OSC账号"

  3. 生成SSH key 
    SSH key 可以让你在你的电脑和 Git @ OSC 之间建立安全的加密连接。 
    ssh-keygen -t rsa -C "xxxxx@xxxxx.com" 
    # Creates a new ssh key using the provided email 
    # Generating public/private rsa key pair...

  4. 查看你的public key,并把他添加到 Git @ OSC 【http://git.oschina.net/keys】 
    cat ~/.ssh/id_rsa.pub 
    会看到格式如

    ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQC6eNtGpNGwstc…. 

    的输出,复制它们添加到上面的网址。

  5. 最后输入ssh -T git@git.oschina.net,若返回

    Welcome to Git@OSC, yourname!

    则证明添加成功。

参考:https://git.oschina.net/oschina/git-osc/wikis/%E5%B8%AE%E5%8A%A9#ssh-keys

相关文章:

  • 2021-07-17
  • 2022-02-08
  • 2022-03-06
  • 2021-09-07
  • 2022-12-23
猜你喜欢
  • 2021-11-21
  • 2021-07-26
  • 2021-10-25
  • 2022-12-23
  • 2021-09-02
  • 2021-11-25
相关资源
相似解决方案