问题

对于我们国内用户,有时候浏览器在进入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. Ubuntu 命令行连接WiFi

    查看是否已经正确安装无线网卡 iwconfig .启动无线网卡, 如果网卡是wlan0 # 方式1 ifconfig wlan0 up # 或者方式2 ip link set wlan0 up .扫描 ...

  2. ajax上传图片报错TypeError: 'append' called on an object that does not implement interface Fo

    使用FormData时报错:TypeError: 'append' called on an object that does not implement interface FormData 解决办 ...

  3. OpenGL ES: (5) OpenGL的基本概念、OpenGL ES 在屏幕产生图片的过程、OpenGL管线(pipeline)

    一. OpenGL的基本概念 OpenGL 的结构可以从逻辑上划分为下面 3 个部分: 图元(Primitives) 缓冲区(Buffers) 光栅化(Rasterize) 图元(Primitives ...

  4. flex简单参考实例

    <!DOCTYPE html> <html> <head> <title></title> <style type="tex ...

  5. PHP技术知识点整理

    1.解释mvc (1)mvc即 模型model,视图view,控制器controller:是一种模型,是一种编程思想,就是把一个应用的输入.输出.数据处理分开,分解耦合(2)A..视图,数据采集和处理 ...

  6. DataSource接口 Connection pooling(连接池

    一.DataSource接口是一个更好的连接数据源的方法:  JDBC1.0是原来是用DriverManager类来产生一个对数据源的连接.JDBC2.0用一种替代的方法,使用DataSource的实 ...

  7. pytorch transforms.Lambda的使用

    当你想要对图像设置transforms策略时,如: from torchvision import transforms as T normalize = T.Normalize([0.485, 0. ...

  8. 008-SpringBoot发布WAR启动报错:Error assembling WAR: webxml attribute is required

    一.Spring Boot发布war包流程: 1.修改web model的pom.xml <packaging>war</packaging> SpringBoot默认发布的都 ...

  9. 使用log4j将日志输送到控制台、文件或数据库中

    转: 使用log4j将日志输送到控制台.文件或数据库中 2018-09-07 00:45:08 keep@ 阅读数 2880更多 分类专栏: 其它   版权声明:本文为博主原创文章,遵循CC 4.0 ...

  10. nginx通过robots.txt禁止所有蜘蛛访问(禁止搜索引擎收录)

    在server {} 块中添加下面的配置 location =/robots.txt { default_type text/html; add_header Content-Type "t ...