3dwelcome
V2EX  ›  问与答

怎么用优雅的方式,让程序自动下载 github 上的依赖包?

  •  
  •   3dwelcome · Jun 15, 2021 · 2145 views
    This topic created in 1822 days ago, the information mentioned may be changed or developed.

    比如有一句 py 代码 requests.get(url),要下载 https://github.com/cuda/archive/16.zip 上的最新依赖包,直连就会卡住。

    除了修改 py 源代码,还有其他办法来下载 github.com 上的 zip 吗?

    5 replies    2021-06-15 08:21:24 +08:00
    lostberryzz
        1
    lostberryzz  
       Jun 15, 2021
    自建 gh-proxy
    3dwelcome
        2
    3dwelcome  
    OP
       Jun 15, 2021
    @lostberryzz 好麻烦,我现在是先把 github 文件下载到本地后,自己建个本地 web 服务器,把 github.com 重定向到 127.0.0.1

    老外又特别喜欢直连 github.comraw.github.com 下一些依赖包,头大。
    Rheinmetal
        3
    Rheinmetal  
       Jun 15, 2021
    境外 vps 上搭建环境 ssh 过去开发?
    QingStone
        4
    QingStone  
       Jun 15, 2021 via iPhone   ❤️ 1
    把代理挂在到终端,或者全局
    Volekingsg
        5
    Volekingsg  
       Jun 15, 2021 via iPhone   ❤️ 1
    @3dwelcome 那你不如看看这两个 https://github.com.cnpmjs.org/https://gitclone.com/ 当然走代理才是最一劳永逸的方法
    About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   3286 Online   Highest 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 45ms · UTC 11:43 · PVG 19:43 · LAX 04:43 · JFK 07:43
    ♥ Do have faith in what you're doing.