louisxxr
V2EX  ›  问与答

Git 使用 git clone 命令用 ssh 克隆,具体报错如下,怎么办?已经在墙外了

  •  
  •   louisxxr · May 24, 2022 · 1535 views
    This topic created in 1462 days ago, the information mentioned may be changed or developed.
    ssh: connect to host github.com port 22: Connection refused

    fatal: Could not read from remote repository.

    Please make sure you have the correct access rights and the repository exists.
    5 replies    2022-05-29 00:27:33 +08:00
    ysc3839
        1
    ysc3839  
       May 24, 2022 via Android
    建议改用 https 协议
    TravisMtg
        2
    TravisMtg  
       May 24, 2022 via iPhone
    密钥没配对吧
    wdssmq
        3
    wdssmq  
       May 24, 2022
    Add new SSH keys
    https://github.com/settings/ssh/new

    执行:

    ssh-keygen -t ecdsa

    一路回车,然后找到生成的 *.pub 文件,把里边内容添加到上边地址内;

    新增 SSH 密钥到 GitHub 帐户 - GitHub Docs
    https://docs.github.com/cn/authentication/connecting-to-github-with-ssh/adding-a-new-ssh-key-to-your-github-account
    lrhtony
        4
    lrhtony  
       May 29, 2022
    ssh 被阻断了,挂梯子
    lrhtony
        5
    lrhtony  
       May 29, 2022
    @lrhtony ssh 默认不走代理,要到 config 文件里设置
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   2858 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 466ea39e · 43ms · UTC 15:19 · PVG 23:19 · LAX 08:19 · JFK 11:19
    ♥ Do have faith in what you're doing.