ubuntu 配置静态ip && git clone ssh port 22问题 && git 全局代理
来源:互联网 发布:淘宝商品质量问题退钱 编辑:程序博客网 时间:2024/06/11 11:03
一)
1. 找到文件并作如下修改:
sudo vim /etc/network/interfaces
修改如下部分:
auto eth0
iface eth0 inet static
address 192.168.0.117
gateway 192.168.0.1 #这个地址你要确认下 网关是不是这个地址
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
注意ifconfig查看本地的网卡名字(不一定是eth0)
2. 修改dns解析
因为以前是dhcp解析,所以会自动分配dns服务器地址
而一旦设置为静态ip后就没有自动获取到的dns服务器了
要自己设置一个
sudo vim /etc/resolv.conf
写上一个公网的DNS
nameserver 202.96.128.86
直接写本地的127.0.0.1 也可以
3 完全修改
vim /etc/resolvconf/resolv.conf.d/base
永久修改
4. 重启网卡:
sudo /etc/init.d/network restart
二)
出现如下问题时:
ssh: connect to host github.com port 22: Connection refusedfatal: The remote end hung up unexpectedly
Add the following to your ./.ssh/config:
host github.com hostname ssh.github.com port 443三)git全局代理
通过在终端输入
export all_proxy=socks://addr:port
export ALL_PROXY=socks://addr:port
然后终端上执行的git所有操作都会走代理
取消代理:
unset all__proxy
unset ALL_PROXY
查看当前代理:
cd /etc/
env grep | proxy
更多方式可以查看
https://segmentfault.com/q/1010000000118837
- ubuntu 配置静态ip && git clone ssh port 22问题 && git 全局代理
- git clone 代理配置
- ubuntu git 代理配置
- 配置shadowsocks代理加快git clone速度
- nodejs Java SSH Git ADB 全局配置
- git clone时出现ssh: connect to host github.com port 22: Connection timed out fatal: Could not read from
- github后台配置ssh key之后本地无法git clone的问题 Permission denied (publickey).
- linux ubuntu 12.04 搭建git服务器:ssh方式clone
- 内网配置git ssh代理
- git下SSH配置问题
- Git代理设置,加速clone
- git代理设置 加速git clone
- Git(GitHub) 004 配置代理 目的:clone提速
- 配置SSH Keys到github,实现git clone 能力
- git clone 权限问题
- ubuntu安装ssh及配置静态ip
- Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
- Ubuntu 安装配置SSH(ssh: connect to host localhost port 22: Connection refused问题的解决)
- 数据库水平切分的实现原理解析——分库,分表,主从,集群,负载均衡器(转)
- 归并排序
- CodeIgniter框架源码学习之配置类--Config.php
- 【CUGBACM15级BC第12场 A】【STL】hdu 5058 So easy
- SeetaFace开源人脸识别引擎
- ubuntu 配置静态ip && git clone ssh port 22问题 && git 全局代理
- 最短路径
- 文件I/O
- Java接收Cordys中webservice接口的返回数据并解析xml获取相应节点数据
- SVM NG机器学习
- 按图索骥法解决错误
- https
- Maven 环境搭建
- LeetCode 401 Binary Watch