阿里云ECS服务器,超快 git clone/wget/curl 解决方案,下载速度有效提升100倍

一、经常远程链接 阿里云 ECS 服务器 ,遇到如下问题:

  • git clone … 慢
  • curl -L http:// … 慢
  • wget http:// … 慢

二、快速提升下载速度:

在 ECS中,下载开源仓库的包,速度特别慢,通常维持在 10k/s 左右;是不是头痛欲裂,来,来,来,下载速度(git clone/wget/curl)有效提升100倍(由KB到MB),请按如下操作:

vim /etc/ssh/ssh_config

目标:找到 GSSAPIAuthentication no 这行,删掉前面的注释 “#” 号,然后保存退出

# Host *
#   ForwardAgent no
#   ForwardX11 no
#   RhostsRSAAuthentication no
#   RSAAuthentication yes
#   PasswordAuthentication yes
#   HostbasedAuthentication no
   GSSAPIAuthentication no
#   GSSAPIDelegateCredentials no
#   GSSAPIKeyExchange no
#   GSSAPITrustDNS no
#   BatchMode no
#   CheckHostIP yes
#   AddressFamily any
#   ConnectTimeout 0
#   StrictHostKeyChecking ask
#   IdentityFile ~/.ssh/identity
#   IdentityFile ~/.ssh/id_rsa
#   IdentityFile ~/.ssh/id_dsa
#   IdentityFile ~/.ssh/id_ecdsa
#   IdentityFile ~/.ssh/id_ed25519
#   Port 22
#   Protocol 2
#   Cipher 3des
#   Ciphers aes128-ctr,aes192-ctr,aes256-ctr,arcfour256,arcfour128,aes128-cbc,3des-cbc
#   MACs hmac-md5,hmac-sha1,umac-64@openssh.com,hmac-ripemd160

三、检验成果:

  • 没有配置前,链接都超时,何谈下载;即使连上下载速度在KB;
  • 修改/etc/ssh/ssh_config后,速度可达MB,亲测有用
  • 建议,用完之后,将参数再修改回去,安全可靠,防止系统漏洞攻击
    在这里插入图片描述
  • 3
    点赞
  • 8
    收藏
    觉得还不错? 一键收藏
  • 1
    评论
要将git clone的源换成阿里云,可以按照以下步骤操作: 1. 首先,新建一个文件夹并进入该文件夹,可以通过右键选择"git Bash here"进入命令行。 2. 在命令行中输入以下命令:git clone https://git.oschina.net/码云上项目的地址.git。这将会将码云上的项目克隆到你的本地。 3. 如果下载速度较慢,你可以尝试以下方法来提升下载速度: a. 使用curl命令: curl -L http://…(需要下载的文件链接)。 b. 使用wget命令: wget http://…(需要下载的文件链接)。 4. 如果克隆失败,你可以使用git remote -v命令来查看当前的远程链接。如果没有任何输出,你可以使用git remote add命令来添加阿里云项目的地址。 5. 最后,打开GitHub Desktop并选择"File -- Add local...",然后选择刚刚新建的文件夹即可将其添加到GitHub Desktop中。<span class="em">1</span><span class="em">2</span><span class="em">3</span> #### 引用[.reference_title] - *1* *3* [git迁移到阿里云](https://blog.csdn.net/weixin_44052462/article/details/123692036)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] - *2* [阿里云ECS服务器超快 git clone/wget/curl 解决方案下载速度有效提升100](https://blog.csdn.net/zhiboqingyun/article/details/123912058)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v93^chatsearchT3_2"}}] [.reference_item style="max-width: 50%"] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值