打开APP
userphoto
未登录

开通VIP,畅享免费电子书等14项超值服

开通VIP
git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known--解决方式

错误如下: 
git push origin 
ssh: Could not resolve hostname ssh.github.com: Name or service not known 
fatal: Could not read from remote repository.

Please make sure you have the correct access rights 
and the repository exists. 
make: * [deploy] 错误 128

解决方式1: 
step1. ping github.com 
获取到github.com的ip为192.30.252.128 
step2. 在/etc/hosts中添加一行如下: 
192.30.252.128 github.com

解决方式2: 
以root权限执行如下python代码

#!/usr/bin/python#coding=utf8import sockethost = 'github.com'try:    with open('/etc/hosts', 'a+') as fp:         ip = socket.gethostbyname(host)        fp.write(' '.join([ip, host, '\n']))except BaseException as e:    print(e)else:    print('sucess')
本站仅提供存储服务,所有内容均由用户发布,如发现有害或侵权内容,请点击举报
打开APP,阅读全文并永久保存 查看更多类似文章
猜你喜欢
类似文章
【热】打开小程序,算一算2024你的财运
安装hadoop2.4.1,启动报错,麻烦帮忙看看是
同个电脑多个ssh key的配置使用(转)
如何为 Git Shell 命令使用不同的私有 SSH 密钥
Github的SSH KEY配置
ssh config配置更新 | 学步园
Git-多账户配置SSH免密登录
更多类似文章 >>
生活服务
热点新闻
分享 收藏 导长图 关注 下载文章
绑定账号成功
后续可登录账号畅享VIP特权!
如果VIP功能使用有故障,
可点击这里联系客服!

联系客服