问题

对于我们国内用户,有时候浏览器在进入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之路——day1(一点十五分 MMP终于把显卡装好了)

    因为要上手深度学习的原因,购置了一台RTX2080TI+ubuntu18.04的机器 例行两条命令 sudo apt-get update sudo apt-get upgrade 开启巨坑第一天,以 ...

  2. 2019SDN课程阅读作业(2)

    1.过去20年中可编程网络的发展可以分为几个阶段?每个阶段的贡献是什么? 分为三个阶段,第一个阶段是主动网络(从20世纪90年代中期到21世纪初),它在网络中引入了可编程功能,以实现更大的创新:第二个 ...

  3. Barman安装及备份PostgreSQL

    barman特点 零数据丢失备份.保证用户在只有一台备份服务器的情况下达到零数据丢失. 与备份服务器合作.允许备份服务器在与主服务器的流式复制不可用时,从barman获取wal文件. 可靠的监控集成. ...

  4. GLTF模型查看器---优化器【转】

    https://blog.csdn.net/weixin_43081805/article/details/88743277 Clay Viewer(我只想说好用,直接可以导出gltf的二进制glb格 ...

  5. SSH项目中使用struts-tags报错According to TLD or attribute directive in tag file, attribute test does not accept any expressions

    在运行struts2标签页面时报错,代码如下:<%@ page language="java" pageEncoding="gbk"%><%@ ...

  6. windows下更改Apache以fastcgi方式运行php

    Apache 默认 apache2handler 方式运行处理php. 下面说切换方法: 1.下载fastcgi模块,打开https://www.apachelounge.com/download/选 ...

  7. windows环境下mosquitto环境搭建与mqtt测试

    https://blog.csdn.net/pgpanda/article/details/51800865 工作需求,自己在windows下搭建了一个mosquitto环境测试mqtt 话不多说,直 ...

  8. linux命令实现音频格式转换和拼接

    安装FFmpeg flaceric@ray:~$ sudo apt install FFmpeg flac 安装lame faaceric@ray:~$ sudo apt install lame f ...

  9. 使用cmi工具连接服务器远程装机exsi

    使用cmi工具连接服务器远程装机exsi 网宿机房有两台服务器磁盘坏掉了,后面换了磁盘需要重新初始化系统 访问:http://192.168.48.133/cgi/url_redirect.cgi?u ...

  10. pyenv、virtualenv、virtualenvwrapper三种python多版本介绍

    今天有把此前接触过的三种python实现多版本环境用到的软件pyenv.virtualenv.virtualenvwrapper,了解了一番,现做如下总结: 一.pyenv: 是针对python多版本 ...