zoukankan      html  css  js  c++  java
  • 异常:fatal: unable to access 'https://git.oschina.net/pcmpcs/library.git/': Could not resolve host

    git  fork项目时出现的异常.

    原因: 我以前用的是ssh地址做的远程通信地址,而这次是用的是https,因为很久没用,所以忘记了以前是用ssh的了。
    解决方案一:复制ssh协议的地址,然后再关联远程仓库。
    并且在VCS下的git下的Remotes中去掉https的地址
    (也可以在VCS下的git下的Remotes中关联远程仓库的地址)
    注意:
    ssh协议地址:git@git.oschina.net:yiter/mkbzh.git
    https协议地址:https://git.oschina.net/yiter/mkbzh.git
    解决方案二:换成https协议
    1.git remote -v  //查看当前远程服务器地址
    origin  git@git.oschina.net:yiter/mkbzh.git (fetch)
    origin  git@git.oschina.net:yiter/mkbzh.git (push)
    发现是ssh的,所以我用https地址一直报错。
    2.git remote set-url --add origin https://git.oschina.net/yiter/mkbzh.git(https协议的)
    通过如上命令修改了地址方式,再次通过  git remote -v 发现已经变成https协议了

  • 相关阅读:
    dubbo服务provider方打印警告日志,getDeserializer
    [学习]sentinel中的DatatSource(一) ReadableDataSource
    ppt字体
    dubbo异常filter
    术语
    [转]五步git操作搞定Github中fork的项目与原作者同步
    markdown学习资料
    springboot properties
    aop备忘
    git技巧
  • 原文地址:https://www.cnblogs.com/inspred/p/7551835.html
Copyright © 2011-2022 走看看