• git--config


    1 设置用户

     

    1.1 全局用户

     

    1.1.1 设置姓名、邮箱

    git config --global user.name "你的账号名称"
    git config --global user.email "你的邮箱"
    

    1.1.2 生成 SSH key 文件

    一路回车,使用默认值即可

    ssh-keygen -t rsa -C "你的邮箱"
    

    1.1.3 添加 key 到 github 账号上

     
    1. 到对应路径中拷贝刚生成的 xxx.pub 文件中的内容(一个字符串)
    2. 登录 github 账号,点击 头像->Settings->SSH and GPG keys-> New SSH key
    3. Title 任意,Key 中粘贴上拷贝的字符串,确认(可能需要输入密码确认)

    1.1.4 连接测试

    ssh -T git@github.com
    
    1. 成功提示

      Hi 你的账号名称! You've successfully authenticated, but GitHub does not provide shell access.

    2. 连接出错
      1. Permission denied
        1. 错误提示(类似下面这样子的)

          Permissions 0670 for 'home/12131.ssh/idrsa' are too open. It is recommended that your private key files are NOT accessible by others. This private key will be ignored. Load key "home/12131.ssh/idrsa": bad permissions Permission denied (publickey).

        2. 通过设置权限解决
          chmod 755 ~/.ssh/
          chmod 600 ~/.ssh/id_rsa ~/.ssh/id_rsa.pub
          chmod 644 ~/.ssh/known_hosts
          

    Created: 2019-12-10 周二 16:22

    Validate

  • 相关阅读:
    mysql 双机互备份
    ubuntu12.04 qtcreate支持中文输入
    新版IDEA 2020.1遇到的坑Error:(3,32)java:程序包org.springframework.boot不存在Error:
    No partition predicate found for Alias "TS" Table ""
    SQL语句中sum与count的区别
    :line 1:100 cannot recognize input near '<EOF>' '<EOF>' '<EOF>' in statement
    mysql计算某个字段最长值
    mysql字段varchar长度分配对性能的影响
    【MySQL】NOT NULL default 0
    FAILED: NoMatchingMethodException No matching method for class org.apache.hadoop.hive.ql.udf.UDFToString with (struct<hashtags:array<string>
  • 原文地址:https://www.cnblogs.com/heidekeyi/p/12017427.html
Copyright © 2020-2023  润新知