在windows users 用户目录下生成config文件,如在C:\Users\your_user_name\.ssh 目录下,找到config文件,如果没有新建一个,写入如下内容:

Host github.com
Host ssh.github.com
ProxyCommand connect -H 127.0.0.1:1080 %h 22

[2020-05-31更新]

测试连接命令

ssh git@github.com -vT  #加v会显示debug信息

刚刚发现设置的代理不管用了。git push命令提示

ERROR: Unexpected http response: ''.
FATAL: failed to begin relaying via HTTP.
ssh_exchange_identification: Connection closed by remote host
fatal: Could not read from remote repository. Please make sure you have the correct access rights
and the repository exists.

测试连接提示

CreateProcessW failed error:2
posix_spawn: No such file or directory

经过搜索,猜测可能是Host的问题,原来的配置是Host github.com 。搜了一圈,感觉别人说的配置没什么不同,然后后来又测试,发现是连接不上,就想到可能是Host不对,因为搜的时候发现有个人Host写的有ssh.github.com。把Host改成这个之后可以通过连接测试。可能是github换域名解析了什么的,不清楚,反正再加一个Host。

参考链接:

https://upupming.site/2019/05/09/git-ssh-socks-proxy/

github配置SSH proxy的更多相关文章

  1. window下配置SSH连接GitHub、GitHub配置ssh key

    window下配置SSH连接GitHub.GitHub配置ssh key   此经验分两部分: 第一部分介绍:在windows下通过msysGit(Git for windows.Git Bash)配 ...

  2. window下配置SSH连接GitHub、GitHub配置ssh key(转)

    转自:http://jingyan.baidu.com/article/a65957f4e91ccf24e77f9b11.html 此经验分两部分: 第一部分介绍:在windows下通过msysGit ...

  3. github配置ssh密钥的方法

    配置用户名和邮箱 初次安装git需要配置用户名和邮箱,否则git会提示:please tell me who you are. 你需要运行命令来配置你的用户名和邮箱: $ git config --g ...

  4. gitlab 和 github 配置 SSH Keys

    gitlab 文档上给了很好的配置的例子:https://gitlab.com/help/ssh/README#locating-an-existing-ssh-key-pair 针对mac 下的使用 ...

  5. Github 配置 SSH

    HTTPS方式管理的直接输入登录用户名和密码就可以.下面介绍SSH的方式. mac系统为例,官方ssh参考:https://help.github.com/articles/generating-ss ...

  6. Github配置SSH连接

    安装git.exe,打开Git Bash 1.检查是否已经有SSH Key. $cd /.ssh 2.生成一个新的SSH. $ ssh-keygen -t rsa -C "email@git ...

  7. Github配置SSH

    以前也配置过ssh,但是没有注意用法,在配置一次熟悉流程 检查本机是否有ssh key设置 $ cd ~/.ssh 或cd .ssh 如果没有则提示: No such file or director ...

  8. github配置ssh key

    一 初次安装git配置用户名和邮箱 git config --global user.name "xxx" git config --global user.email " ...

  9. github配置ssh及多ssh key问题处理

    一.生成ssh公私钥 用ssh-keygen生成公私钥. $ssh-keygen -t rsa -C "你的邮箱" -f ~/.ssh/id_rsa_mult 在~/./ssh目录 ...

随机推荐

  1. .NET Core开源Quartz.Net作业调度框架实战演练

    一.需求背景 人生苦短,我用.NET Core!作为一枚后端.NET开发人员,项目实践常遇到定时Job任务的工作,在Windows平台最容易想到的的思路Windows Service服务应用程序,而在 ...

  2. Kubernetes 及安装注意事项

    Docker Desktop for Mac/Windows开启Kubernetes 及安装注意事项 Table of Contents 1 解决方案 2 注意事项 2.1 Choose Kubeco ...

  3. Word 插入目录详细教程 -- 视频教程(6)

    >> 视频教程链接:B站,速度快,清晰 更多关于插入目录的方法,参看:Word插入目录系列 未完 ...... 点击访问原文(进入后根据右侧标签,快速定位到本文)

  4. 关于Django数据库mysql连接错误问题Connection to api@localhost failed. [08001] Could not create connection to d

    Connection to api@localhost failed. [08001] Could not create connection to d 错误类型 django连接mysql数据库错误 ...

  5. day18——re正则表达式

    day18 re模块--正则表达式 匹配方法 findall():从字符串中全部查找内容,返回一个列表 s = "meet_宝元_meet" print(re.findall(&q ...

  6. ubuntu 安装harbor仓库

    一.介绍 Harbor,是一个英文单词,意思是港湾,港湾是干什么的呢,就是停放货物的,而货物呢,是装在集装箱中的,说到集装箱,就不得不提到Docker容器,因为docker容器的技术正是借鉴了集装箱的 ...

  7. 使用canvas实现360水球波动

    代码如下: <!DOCTYPE html> <html lang="en">  <head>    <meta charset=" ...

  8. Udp客户端与服务通讯

    使用UDP与服务端通讯时候,同样需要先启用udp服务端监控,当服务端启动成功,在启动客户端 首先UDP服务端类,代码如下: public class UdpServerTest { public vo ...

  9. AspNetCore MVC页面数据提交验证

    2019/05/14,AspNetCore 2.2.0 摘要:AspNetCore MVC使用数据注释配合jquery.validate提交页面进行前端加后端的数据验证 主要用到了jquery.val ...

  10. Fedora 30系统的升级方法

    Fedora 30 已经发布了.你可能希望将系统升级到最新版本的 Fedora.Fedora 工作站版本有图形化升级的方法.另外,Fedora 也提供了一个命令行方法,用于将 Fedora 29 升级 ...