今天 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. sqlite时间比较语法

    如下: 字段 > datetime('2000-01-01 01:01:01') AND 字段 < datetime('2001-01-01 01:01:01');

  2. UIFontFamily

    Family: Hiragino Kaku Gothic ProN W3     Font: HiraKakuProN-W3 Family: Courier     Font: Courier     ...

  3. livevent的几个问题

    关于libevent的几个问题 1.他到底是如何保证这个套接字有效的 主线程去断开关闭套接字,主线程去调用buffwrite,在子线程收到客户端断开时,主线程延迟1分钟释放,这样保证子线程操作完该so ...

  4. Linux --windows vs

    我其实并不是很清楚我在做什么....希望做完之后可以解答....... 在看了一堆GNU, Clang, GCC, QT, MinGW, CygWin, POSIX 这些概念之后,我觉得我在做的事情就 ...

  5. 6-Highcharts曲线图之带标识

    <!DOCTYPE> <html lang='en'> <head> <title>6-Highcharts曲线图之带标识</title> ...

  6. Windows键盘快捷键

  7. 利用传入的Type类型来调用范型方法的解决方案

    起因:自定义一个GridView控件,其数据源来源于一个通用方法Get<T>(),根据你传入的T到数据库中得到相应的数据,问题是定义GridView控件时没法在界面端设置使用泛型,只能在每 ...

  8. samsung-smart app 开发

    http://www.samsungdforum.com/ http://seller.samsungapps.com/login/signIn.as?returnURL=%2fmain%2fsell ...

  9. Ogre1.8.1编译时大量warning的问题

    本文的编译环境为Windows7_SP1 + VS2010_SP1 :) 当编译Ogre1.8.1的源码时,会出现大量的warning,如图: 虽然没有太大影响,但是程序员都希望自己的程序是没有war ...

  10. C4.5决策树--Java

    ID3是以信息增益作为划分训练数据集的特征,即认为信息增益大的特征是对分类结果影响更大,但是信息增益的方法偏向于选择取值较多的特征,因此引入了C4.5决策树,也就是使用信息增益率(比)来作为划分数据集 ...