zoukankan      html  css  js  c++  java
  • mac之开发中的环境配置

    git

    ping github.com 

    解决githubcom访问慢

    https://blog.csdn.net/yh0503/article/details/90233216

    GitHub.com域名查询

    https://site.ip138.com/github.com/

    访问网址http://github.com.ipaddress.com/,分别获取github.com、github.global.ssl.fastly.net对应的IP

    github.com,192.30.253.112 192.30.253.113

    assets-cdn.github.com,101.184.133

    global.ssl.fastly.net,151.101.185.194

    编辑文件

    git config --edit --global 

    设置Git缓存值大小 1048576000

    sudo git config --global http.postBuffer 524288000

    sudo git config --global https.postBuffer 524288000

    git config --list 查看设置值

    sudo git config --global http.postBuffer 1048576000

    sudo git config --global https.postBuffer 1048576000

    git config http.postBuffer 1048576000

    需要注意的是http.postBuffer 后,单位是b,524288000B也就500M左右

    然后增加最低速度时间

    git config --global http.lowSpeedLimit 0

    git config --global http.lowSpeedTime 999999

    git config http.postBuffer 524288000

    //或全局设置

    git config --global http.postBuffer 524288000.

    git clone --depth=1 http://xxx.git

    git fetch --unshallow

    home brew

    Mac 解决 Homebrew 一直卡在 update

    https://www.jianshu.com/p/77c60428569d

     https://blog.csdn.net/weixin_36562804/article/details/107872131

    mac 下 Homebrew 可能会在 install 或者 update 的时候会很慢,卡很久。

    两种方式来解决:

    一、直接关闭brew执行命令时的自动更新

    # 1. 编辑配置文件
    vim ~/.bash_profile
    
    # 2. 文件内新增一行
    export HOMEBREW_NO_AUTO_UPDATE=true
    
    # 3. 重新加载配置文件
    source ~/.bash_profile
    

    二、替换brew

    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.ustc.edu.cn/brew.git
    
    #替换homebrew-core.git
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.ustc.edu.cn/homebrew-core.git
    brew update
    
    # 备用地址-1
    cd "$(brew --repo)"
    git remote set-url origin https://git.coding.net/homebrew/homebrew.git
    brew update
    
    # 备用地址-2
    cd "$(brew --repo)"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/brew.git
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://mirrors.tuna.tsinghua.edu.cn/git/homebrew-core.git
    brew update
    

    PS:官方默认信息

    # 1. 重置brew.git
    cd "$(brew --repo)"
    git remote set-url origin https://github.com/Homebrew/brew.git
    
    # 2. 重置homebrew-core.git
    cd "$(brew --repo)/Library/Taps/homebrew/homebrew-core"
    git remote set-url origin https://github.com/Homebrew/homebrew-core.git
  • 相关阅读:
    C Language Study
    html学习笔记五
    [CS]C#操作word
    bzoj2502 清理雪道
    Android Studio怎样查看资源或者函数在哪些类中被引用
    jvm载入过程
    poj2513(无向图判欧拉路)
    7 天玩转 ASP.NET MVC — 第 2 天
    从头认识java-18.2 主要的线程机制(7)join
    启动MFC程序的时候报错:0xC0000005: 读取位置 0x00000000 时发生访问冲突
  • 原文地址:https://www.cnblogs.com/sundaysme/p/13660697.html
Copyright © 2011-2022 走看看