今天 git push 的时候报如下错误:

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

fatal: Could not read from remote repository.

Please make sure you have the correct access rights

and the repository exists.

  最开始还以为是权限被修改了,后来问了朋友下,他建议使用 https 协议试试,看是否成功,如何在使用 ssh 协议的同时又使用 https 协议呢?我们只需要新增一个 remote 即可,步骤如下:

1、添加远程仓库

git remote add remoteName url

  remoteName 仓库名称,可以自定义,不可和已有的仓库名称同名。这个名称,push和pull的时候是需要用到的。默认的是 origin

2、获取或推送

// pull
git pull remoteName branchName // push
git push remoteName branchName

  结果发现push成功了,因此可以排除权限问题了。

那么出现这个原因的问题是什么?可能是服务器不稳定导致 ssh协议被gateway认证失败了,或者一些其他未知的原因。

ssh: Could not resolve hostname gitcafe.com: nodename nor servname provided, or not known的更多相关文章

  1. 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 ...

  2. 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 fata ...

  3. 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 ...

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

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

  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. ssh: Could not resolve hostname github.com: Name or service not known

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

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

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

  9. 一站式解决Mac--socket.gaierror: [Errno 8] nodename nor servname provided, or not known

    socket.gaierror: [Errno 8] nodename nor servname provided, or not known 原因:hostname 没有写在/etc/hosts里 ...

随机推荐

  1. iNode for linux install

    http://wenku.baidu.com/link?url=953T6GZCnaBzwr4YqPFUT4oOyYr4wyOnXlCLO1OUYZkaJWh2fTs634SM7ZpYiTKkpmYX ...

  2. win8.1 环境下搭建PHP5.5.6+Apache2.4.7

    本文主要阐述在windows8及win8.1 环境下搭建PHP5.5.6+Apache2.4.7. 1.软件准备 apache 2.4.7:http://pan.baidu.com/s/1iUPif ...

  3. sql server 数据页缓冲区的内存瓶颈分析

        查看数据库的计数器: SELECT * FROM  sys.dm_os_performance_counters   **也可以使用系统的性能计监测器查看. 右键图表-> 添加计数器. ...

  4. css hack一览

    浏览器对css hack的支持情况

  5. 谈谈arm下的函数栈

    引言 这篇文章简要说说函数是怎么传入参数的,我们都知道,当一个函数调用使用少量参数(ARM上是少于等于4个)时,参数是通过寄存器进行传值(ARM上是通过r0,r1,r2,r3),而当参数多于4个时,会 ...

  6. javascript实现数据结构与算法系列:栈 -- 顺序存储表示和链式表示及示例

    栈(Stack)是限定仅在表尾进行插入或删除操作的线性表.表尾为栈顶(top),表头为栈底(bottom),不含元素的空表为空栈. 栈又称为后进先出(last in first out)的线性表. 堆 ...

  7. 《Thinking in C++》学习笔记(一)【第二章】

    第二章 对象的创建与使用 2.1语言的翻译过程 翻译器分为两类:解释器(interpreter)和编译器(compiler). 2.1.1解释器 解释器将源代码转化成一些动作(它可由许多机器指令组成) ...

  8. 为jquery qrcode生成的二维码嵌入图片

    在一次微信项目中,需要实现通过扫描二维码来进行会议签到,二维码的生成选择了qrcode.js的版本,然后使用jquery.qrcode.js插件来绘制二维码. <script type=&quo ...

  9. Codeforces Round #258 (Div. 2)(A,B,C,D)

    题目链接 A. Game With Sticks time limit per test:1 secondmemory limit per test:256 megabytesinput:standa ...

  10. spring_150805_datasource

    实体类: package com.spring.model; public class DogPet { private int id; private String name; private in ...