查看代理并解除代理
昨天使用lantern,今天重新开机以后网络不能正常使用了,重启也不行,在使用git
从远程仓库下载代码的时候还出现了fatal: unable to access 'https://github.com/sharibox/EAD2019.git/': Failed to connect to 127.0.0.1 port 42977: 拒绝连接
的错误,这是因为使用了proxy的代理,所以为了解决这个问题,主要是取消代理
- 查看linux当前是否使用代理
env|grep -i proxy
从上面可以看出,有很多协议占用了这个端口,有http、https、no
- 通过系统命令取消代理
unset http_proxy
unset https_proxy
unset no_proxy
unset HTTP_PROXY
unset HTTPS_PROXY
unset NO_PROXY
- 重新尝试
git clone
命令
查看端口号并解除端口号的占用
- 查看进程:
ps
或者使用命令
htop
- 终止进程号:
kill -9 进程号
- 查看指定端口的使用情况
netstat -tln | grep 1080
- 查看系统端口的使用情况
netstat -anp