louisxxr
V2EX  ›  问与答

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

  •  
  •   louisxxr · May 24, 2022 · 1968 views
    This topic created in 1633 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
    ysc3839
    May 24, 2022 via Android
    1
    建议改用 https 协议
    TravisMtg
    TravisMtg
    May 24, 2022 via iPhone
    2
    密钥没配对吧
    wdssmq
    wdssmq
    May 24, 2022
    3
    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
    lrhtony
    May 29, 2022
    4
    ssh 被阻断了,挂梯子
    lrhtony
    lrhtony
    May 29, 2022
    5
    @lrhtony ssh 默认不走代理,要到 config 文件里设置
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Privacy   ·   Solana   ·   2918 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 41ms · UTC 00:44 · PVG 08:44 · LAX 16:44 · JFK 19:44
    ♥ Do have faith in what you're doing.