• 异常: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协议了

  • 相关阅读:
    Scala window下安装
    HIVE 总结
    mapreduce源码解析以及优化
    Hadoop2.x + eclipse 插件配置
    python spark
    Hive与Hbase关系整合
    Sqoop架构以及应用介绍
    flume
    SOAP
    Leetcode#75 Sort Colors
  • 原文地址:https://www.cnblogs.com/inspred/p/7551835.html
Copyright © 2020-2023  润新知