• Git推送修改到GitHub中


    主要通过给GitHub设置SSH key的方式实现push权限控制。

    $  ssh-keygen -t rsa -C "你的邮箱"
    Generating public/private rsa key pair.
    //这里指定秘钥文件路径,直接回车即可
    Enter file in which to save the key (/c/Users/my/.ssh/id_rsa):
    Created directory '/c/Users/my/.ssh'.
    //输入登录密码
    Enter passphrase (empty for no passphrase):
    Enter same passphrase again:
    
    Your identification has been saved in /c/Users/my/.ssh/id_rsa
    Your public key has been saved in /c/Users/my/.ssh/id_rsa.pub
    The key fingerprint is:
    SHA256:xxxxxexample@gmail.com
    The key's randomart image is:
    +---[RSA 3072]----+
    |        .o...=o. |
    |        ..  =..  |
    |         ..oE .  |
    |          oo O   |
    |        S B.+ B  |
    |         * O * + |
    |      o = B X o .|
    |     . + = X =   |
    |        o.o =    |
    +----[SHA256]-----+

    在上面路径的id_rsa.pub中得到公钥(全部复制)

    然后进入gitHub中,找到Setting 

    SSH keys / Add new
    //粘贴刚刚获得的公钥到这里
    //勾选允许写权限
     
    保存即可。
  • 相关阅读:
    迈安
    sql 迈安
    Python开发环境02 Windows平台命令行方式
    Python开发环境01 Mac平台命令行方式
    Python简史03 Python启示录
    Python简史02 Python的诞生
    Python简史01 Python的起源
    图书爬虫的进展
    爬虫方面的进展
    最近的进展
  • 原文地址:https://www.cnblogs.com/whutwxj/p/15207389.html
Copyright © 2020-2023  润新知