错误如下: 
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=utf8 import socket host = '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')

git错误--ssh: Could not resolve hostname ssh.github.com: Name or service not known--解决方式的更多相关文章

  1. git提示错误关于错误:ssh: Could not resolve hostname github.com: Name or service not known.fatal: Could not read from remote repository.

    关于 Git 使用中出现的错误 饥人谷_楠柒 关注 2016.11.02 15:33* 字数 746 阅读 3607评论 5喜欢 10赞赏 1 关于错误:ssh: Could not resolve ...

  2. ssh: Could not resolve hostname git.*****-inc.com : Temporary failure in name resolution fatal: The remote end hung up unexpectedly

    问题出现的情景:使用git pull拉取开发的代码到测试服务器,报错: ssh: Could not resolve hostname git.****-inc.com : Temporary fai ...

  3. ssh: Could not resolve hostname gitcafe.com: nodename nor servname provided, or not known

    今天 git push 的时候报如下错误: ssh: Could not resolve hostname gitcafe.com: nodename nor servname provided, o ...

  4. ssh: Could not resolve hostname github.com: Name or service not known

    问题描述 今天早上在自己的虚拟机上用git pull命令更新github上的版本库时提示下面的错误 [root@localhost ~] git clone git@github.com:sdscbr ...

  5. hadoop启动时,报ssh: Could not resolve hostname xxx: Name or service not known

    本文转载自:http://blog.csdn.net/wodewutai17quiet/article/details/76795951 问题:hadoop启动时,报ssh: Could not re ...

  6. ssh: Could not resolve hostname问题终于解决了?

    1.如果系统为64位,无法启动启动hdfs: ./sbin/start-dfs.sh.并有以下错误: sed: -e expression #1, char 6: unknown option to  ...

  7. hadoop启动报错:localhost: ssh: Could not resolve hostname localhost

    hadoop启动journalnode时报错:localhost: ssh: Could not resolve hostname localhost: Temporary failure in na ...

  8. linux-解决/usr/bin/which: no ssh-copy-id in 和ssh: Could not resolve hostname问题

    使用yum install openssh-clients  安装命令 有的系统没有此命令 有的系统缺省 就包含这一条命令! 但是我的测试机没有发现此命令 只能这样安装! 这时有报错了 1 2 [ro ...

  9. Xcode中git的用法介绍与"Please tell me who you are"问题的解决方式

    我在之前多篇博客中解说了怎样使用命令行操作git,能够大大提高我们的工作效率.详细能够參考<Git学习札记><Git学习札记--进阶>等文章.事实上对于同一个工具,我们有不同的 ...

随机推荐

  1. 学习JVM是如何从入门到放弃的?

    前言 只有光头才能变强 JVM在准备面试的时候就有看了,一直没时间写笔记.现在到了一家公司实习,闲的时候就写写,刷刷JVM博客,刷刷电子书. 学习JVM的目的也很简单: 能够知道JVM是什么,为我们干 ...

  2. C#EF中,使用类似于SQL中的% 模糊查询

    最近在做项目的时候需要使用到模糊查询,但是后台使用EF写的 而不是ADO或者是Dapper,如果是这样的话,我们就可以使用Sql语句直接进行模糊查询 现在我们需要在LINQ中使用类似于模糊查询 在EF ...

  3. C# 获取系统当前IE版本号

    1. 注册表中,IE的位置: 计算机\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Microsoft\Internet Explorer 2. 通过注册表读取IE配 ...

  4. Mybatis插入数据返回主键ID

    <insert id="add" parameterType="com.dsa.core.base.model.ProductSync">      ...

  5. Andorid之页面布局优化

    文章大纲 一.为什么要进行页面布局优化二.页面布局优化实操三.项目源码下载四.参考文章 一.为什么要进行页面布局优化   在开发Android时,会遇到某些是通用的布局,我们常将一些通用的视图提取到一 ...

  6. libaio.so.1()(64bit) is needed by MySQL-server 问题解决办法

    [root@localhost upload]# rpm -ivh MySQL-server-5.5.25a-1.rhel5.x86_64.rpmerror: Failed dependencies: ...

  7. Storm入门(十三)Storm Trident 教程

    转自:http://blog.csdn.net/derekjiang/article/details/9126185 英文原址:https://github.com/nathanmarz/storm/ ...

  8. 使用清华开源镜像安装tensorflow

    安装tensorflow时,如果使用直接安装速度相对较慢,采取清华大学的镜像会提高速度.GPU版本安装方法:pip install tensorflow-gpu==1.8 -i https://pyp ...

  9. TensorFlow 2.0 Alpha pip安装指令

    TensorFlow 2.0 Alpha目前已经可以通过pip安装,亲测有效,安装指令为: # 普通版本 pip install tensorflow==2.0.0-alpha0 # GPU版本 pi ...

  10. Go基础(2)

    demo1: package main import ( "fmt" "strings" ) func main() { url := pathToUrl(&q ...