今天 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. c++ union

    什么是union? 翻译过来说,就是共用体,或者也叫联合体.说到了union,也就是共用体,就不得不说一下struct了,当我们有如下的struct的定义时:   1 2 3 4 5 6 struct ...

  2. 结合NGUI做的手机拍照(可自定义相框)

    原地址:http://www.unity蛮牛.com/thread-18220-1-1.html 在次此之前我们先要了解一下下面的我要讲的几个内容: 一.为什么要用NGUI,因为NGUI的可以做屏幕自 ...

  3. php弱类型

    此处写ctf中遇到的==和md5值为0e**的应用. 数组和字符的===   ==

  4. Openstack os-networks API create network 方法

    官方文档在请求方法和地址上有错误: http://api.openstack.org/api-ref.html#ext-os-networks 正确的地址为: /v2/{tenant_id}/os-n ...

  5. LA 3350

    The NASA Space Center, Houston, is less than 200 miles from San Antonio, Texas (the site of the ACM ...

  6. D&F学数据结构系列——前驱和后继

    前驱和后继 本文所述为二叉排序树的前驱和后继,如果想了解二叉排序树的概念,可以参考我的博文http://www.cnblogs.com/sage-blog/p/3864640.html 给定一个二叉查 ...

  7. 免安装jdk 和 免安装tomcat

    免安装tomcat 运行的时候要执行免安装的 jdk,可以进行如下设置. 在 startup.bat 里加上这么一句, set "JAVA_HOME=C:\jdk1.6.0_43"

  8. tomcat 跨域

    http://www.360doc.com/content/14/0920/14/7909375_411017244.shtml http://www.tuicool.com/articles/Znq ...

  9. JAVA类型信息——反射机制

    JAVA类型信息——反射机制 一.反射机制概述 1.反射机制:就是java语言在运行时拥有的一项自我观察的能力,java通过这种能力彻底了解程序自身的情况,并为下一步的动作做准备. 2.反射机制的功能 ...

  10. Android /data/data/app_file/目录下面安装apk无权限问题

    当识别SDCard的时候 String filePath = null; String state = Environment.getExternalStorageState(); if (state ...