Linux下安装vim-plug报错:Failed to connect to raw.githubusercontent.com port 443: Connection refused

安装vim-plug时,输入以下命令:

curl -fLo ~/.vim/autoload/plug.vim --create-dirs     https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

报错以下内容:

Failed to connect to raw.githubusercontent.com port 443: Connection refused

可以尝试以下解决方法:

1、打开hosts

sudo vim /etc/hosts

2、在hosts里面添加下列内容

199.232.28.133 raw.githubusercontent.com

3、重新执行下列命令继续vim-vimplug的安装

curl -fLo ~/.vim/autoload/plug.vim --create-dirs     https://raw.githubusercontent.com/junegunn/vim-plug/master/plug.vim

——cloudos

——2020/4/25

 

 

 

 

 

问题描述中提到了在使用Ubuntu系统时出现了"ssh: connect to host github.com port 22: Connection timed out"的错误。这个错误表示连接到github.com的SSH端口22超时了。为了解决这个问题,可以尝试以下方法: 1. 修改SSH配置文件: - 打开终端并输入以下命令:`sudo vim /etc/ssh/ssh_config` - 找到`#Port 22`这一行(可能是注释状态),将其修改为`Port 443`(如果没有这一行,可以直接添加) - 保存并退出配置文件 - 重新连接到github.com,看是否问题已经解决 2. 使用不同的SSH命令: - 打开终端并输入以下命令:`ssh -T git@ssh.github.com` 或 `ssh -T -p 443 git@github.com` - 如果连接成功并显示"You've successfully authenticated",则说明问题已解决;如果仍然显示"ssh: connect to host github.com port 22: Connection timed out",则继续尝试以下命令 - 输入命令:`ssh -T -p 443 git@ssh.github.com` - 检查是否有异常信息显示 3. 配置新的端口: - 打开终端并输入以下命令:`cd ~/.ssh && vim config` - 在编辑器中添加以下内容并保存退出: ``` Host github.com User git Hostname ssh.github.com PreferredAuthentications publickey IdentityFile ~/.ssh/id_rsa Port 443 ``` - 重新连接到github.com,看是否问题已经解决 这些方法应该能帮助您解决Ubuntu系统中的"ssh: connect to host github.com port 22: Connection timed out"错误。记得在尝试这些方法之前先备份您的SSH配置文件,以防出现意外情况。希望对您有所帮助!
评论 4
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值