V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
V2EX 提问指南
louisxxr
V2EX  ›  问与答

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

  •  
  •   louisxxr · 2022-05-24 21:27:59 +08:00 · 835 次点击
    这是一个创建于 715 天前的主题,其中的信息可能已经有所发展或是发生改变。
    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 条回复    2022-05-29 00:27:33 +08:00
    ysc3839
        1
    ysc3839  
       2022-05-24 21:57:40 +08:00 via Android
    建议改用 https 协议
    TravisMtg
        2
    TravisMtg  
       2022-05-24 22:33:44 +08:00 via iPhone
    密钥没配对吧
    wdssmq
        3
    wdssmq  
       2022-05-24 23:55:11 +08:00
    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  
       2022-05-29 00:25:40 +08:00
    ssh 被阻断了,挂梯子
    lrhtony
        5
    lrhtony  
       2022-05-29 00:27:33 +08:00
    @lrhtony ssh 默认不走代理,要到 config 文件里设置
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   1021 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 32ms · UTC 21:54 · PVG 05:54 · LAX 14:54 · JFK 17:54
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.