美文网首页
github代理

github代理

作者: cjlynn | 来源:发表于2022-03-17 22:06 被阅读0次

    1、github代理

    $ ssh-keygen -t rsa -C "xxx@qq.com"
    Generating public/private rsa key pair.
    Your identification has been saved in /c/Users/admin/.ssh/id_rsa_github
    Your public key has been saved in /c/Users/admin/.ssh/id_rsa_github.pub
    
    #查看代理
    $ ssh-add -l
    Could not open a connection to your authentication agent.
    #没有代理,创建代理
    $ exec ssh-agent bash
    
    $ ssh-add -l
    The agent has no identities.
    #本地添加私钥
    $ ssh-add ~/.ssh/id_rsa_github
    Identity added: /c/Users/admin/.ssh/id_rsa_github (xxx@qq.com)
    
    $ ssh-add -l
    3072 SHA256:LUXavAY3dnEdHxxxxxxxxxxxxxxxxxxxxx xxx@qq.com (RSA)
    
    #github上添加公钥
    #在github上配置上SSHKEY(id_rsa_github.pub)
    
    #配置完成之后可以看到可以连通github了
    $ ssh -T git@github.com
    Hi xxx! You've successfully authenticated, but GitHub does not provide shell access.
    
    

    有时候git连不上 看是否是用户或者邮箱变了,如果是修改后重试
    git config user.name
    git config user.email

    相关文章

      网友评论

          本文标题:github代理

          本文链接:https://www.haomeiwen.com/subject/urgsrrtx.html