问题

对于我们国内用户,有时候浏览器在进入github网站时,会出现无法加载或加载很慢的问题,针对这一问题,很是头疼,为解决这一问题,在网上搜索到的解决方法如下;

解决方案

  • 修改hosts文件,在hosts文件中加入以下内容:

# GitHub Start
# 针对无法加载或加载慢的问题
192.30.253.112 github.com
192.30.253.119 gist.github.com
151.101.100.133 assets-cdn.github.com
151.101.100.133 raw.githubusercontent.com
151.101.100.133 gist.githubusercontent.com
151.101.100.133 cloud.githubusercontent.com
151.101.100.133 camo.githubusercontent.com
151.101.100.133 avatars0.githubusercontent.com
151.101.100.133 avatars1.githubusercontent.com
151.101.100.133 avatars2.githubusercontent.com
151.101.100.133 avatars3.githubusercontent.com
151.101.100.133 avatars4.githubusercontent.com
151.101.100.133 avatars5.githubusercontent.com
151.101.100.133 avatars6.githubusercontent.com
151.101.100.133 avatars7.githubusercontent.com
151.101.100.133 avatars8.githubusercontent.com
# 下载慢问题
219.76.4.4 github-cloud.s3.amazonaws.com
# GitHub End
  • hosts文件所在目录

    • Windows:C:\Windows\System32\drivers\etc\hosts
    • Linux:\etc\hosts
  • 修改后生效方法

    • 关机重启
    • 断网重连
    • Window:Win+R,输入cmd回车,然后在cmd窗口中输入:ipconfig /flushdns
    • Linux:Ctrl+Alt+T打开终端,输入sudo rcnscd restart

问题

使用git同时同步github以及gitee;

解决方案

修改版本库.git/config文件,在文件中加入github和gitee中对应版本库的url,如下例,将我github和gitee中PTA版本库url同时加入,然后在使用git就可以同时同步两端;

[core]
    repositoryformatversion = 0
    filemode = false
    bare = false
    logallrefupdates = true
    symlinks = false
    ignorecase = true
[remote "origin"]
    url = https://gitee.com/cunyu1943/PTA.git
    url = https://github.com/cunyu1943/PTA.git
    fetch = +refs/heads/*:refs/remotes/origin/*
[branch "master"]
    remote = origin
    merge = refs/heads/master

欢迎关注微信公众号:村雨1943;创作不易,未经同意,转载请注明出处~

Github相关问题集锦的更多相关文章

  1. github 相关英语

    github 相关英语 repository n. 仓库 A repository contains all the files for your project, including the rev ...

  2. GitHub相关资料&&可以参加的开源项目

    GitHub相关的资料 有不懂的地方时可以看GitHub Docs. GitHub tutorial GitHub glossary GitHub的字典,可以看到里面特定的概念. All about ...

  3. 2015-2016最火的Android开源项目--github开源项目集锦(不看你就out了)

    标签: Android开发开源项目最火Android项目github 2015-2016最火的Android开源项目 本文整理与集结了近期github上使用最广泛最火热与最流行的开源项目,想要充电与提 ...

  4. WPF相关资料集锦

    微软官方资料 .NET Framework源代码 https://referencesource.microsoft.com/ 微软官方文档 https://docs.microsoft.com/en ...

  5. Git和GitHub相关

    组员从GitHub上下载项目并上传项目的步骤如下 .组员接收到组长发的项目地址,组员需要从GitHub上把项目克隆下来,首先组员 需要在本地的一个文件夹里打开git,然后运行如下代码:git clon ...

  6. git && github 相关

    权限问题(error: The requested URL returned error: 403 Forbidden while accessing):1. 将自己机器的ssh public key ...

  7. 版本控制--github相关

    安装 Git 后,你应该做一些只需做一次的事情:系统设置——这样的设置在每台电脑上只需做一次: $ git config --global user.name "Your Name" ...

  8. github相关指令学习

    正在廖雪峰官网学习关于git的相关知识,已经不是第一次来学习,但是忘得太快,索性这次边学边记录笔记,加深记忆,方便后期查看 1.找到一个合适的地方,鼠标右键 Git Bush Here ,新建文件夹, ...

  9. github相关资料记录

    github官方配ssh api:https://help.github.com/articles/generating-ssh-keys 简书hexo静态博客搭建:http://www.jiansh ...

随机推荐

  1. 15.linux iptables防火墙规则vsftp服务

    一.服务所开启的端口号.          dhcp 67       samba 139 445       http 80  https 443       mysql 3306         ...

  2. 三大框架 之 Hibernate框架概述(概述、配置、核心API)

    目录 Hibernate框架概述 什么是框架 hibernate简介(JavaEE技术三层架构所用到的技术) hibernate是什么框架 ORM hibernate好处 Hibernate基本使用 ...

  3. CentOs7设置主机名称,以及主机名称和ip的对应关系

    一.修改主机名称 在CentOS7中有三种定义的主机名:静态的(static).瞬态的(transient).和灵活的(pretty).静态主机名也称为内核主机名,是系统在启动时从/etc/hostn ...

  4. 小程序 跳转web-view 点击左上角返回需要点击2次才能返回

    小程序  跳转web-view  点击左上角返回需要点击2次才能返回 再html页面引入js即可解决 <script type="text/javascript" src=& ...

  5. Python5种代码维护工具

    原文地址:https://cloud.tencent.com/developer/article/1365969 随着软件项目进入“维护模式”,对可读性和编码标准的要求很容易落空(甚至从一开始就没有建 ...

  6. C#nameof用法

    1.实现代码 using System; namespace NameofUsage { /// <summary> /// C# nameof用法 /// </summary> ...

  7. OpenBLAS编译 Release x64 Win10 vs2015

    >------ 已启动生成: 项目: ZERO_CHECK, 配置: Release x64 ------ > Checking Build System > CMake does ...

  8. DRBD UpToDate/DUnknown 故障恢复

    故障如下: root@drbd1:~# drbd-overview 0:data/0 StandAlone Primary/Unknown UpToDate/DUnknown /data/mysql ...

  9. haproxy高可用、负载均衡集群

    HAProxy提供高可用性.负载均衡以及基于TCP和HTTP应用的代理,支持虚拟主机,它是免费.快速并且可靠的一种解决方案.根据官方数据,其最高极限支持10G的并发.另外其支持从4层至7层的网络交换, ...

  10. SpringBoot中日志配置

    背景 由于一些框架中还使用log4j-1.x系列陈旧的日志框架,调试过程中有一些错误信息不能在控制台显示,增加了调试成本.以下配置方法 将帮助你获得log4j-1.x日志在控制台显示. 解决方法: 使 ...