代理Proxy网络下的Github访问

为了学习Slam真的是又倒腾了一遍Linux系统
实验室的网络是通过代理连接的。

发现两个问题

  1. Github 通过ssh 无法连接
  2. 无法使用apt-get install类似指令

原因似乎是因为proxy只对于网页有效,对于命令行是没有效果的,因此我们只能单独设置它们的proxy

解决方案

Github 通过ssh 无法连接
getdit ~/.bashrc

进入后添加

export http_proxy=http://[Proxy]:[Port]

退出后就可以啦

无法使用apt-get install类似指令

全局设置

git config --global http.proxy http://proxyuser:[email protected]:8080

之后再检查一遍,看看与输入的是否有误

git config --global --get http.proxy

当不再需要github proxy时,只需要

git config --global --unset http.proxy

你可能感兴趣的:(代理Proxy网络下的Github访问)