V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
molly2mollyzyz
V2EX  ›  Flutter

flutter pub publish 一直返回`pub finished with exit code 69`,该如何才能上传成功?

  •  
  •   molly2mollyzyz · 2023-02-15 10:21:17 +08:00 · 1659 次点击
    这是一个创建于 674 天前的主题,其中的信息可能已经有所发展或是发生改变。

    目前已尝试的手段有:

    1. 设置终端代理

       $ export http_proxy=http://127.0.0.1:7890
       $ export https_proxy=$http_proxy
       
       # 已正常返回
       $ curl google.com
       <HTML><HEAD><meta http-equiv="content-type" content="text/html;charset=utf-8">
       <TITLE>301 Moved</TITLE></HEAD><BODY>
       <H1>301 Moved</H1>
       The document has moved
       <A HREF="http://www.google.com/">here</A>.
       </BODY></HTML>
      
    2. 注释~/.bash_profile

      # export PUB_HOSTED_URL=https://pub.flutter-io.cn
      # export FLUTTER_STORAGE_BASE_URL=https://storage.flutter-io.cn
      
      $ source ~/.bash_profile
      
    3. 尝试上传

       $ flutter packages pub publish --server=https://pub.dartlang.org
       $ flutter pub publish --server=https://pub.dev
       
       # 均返回
       Connection closed before full header was received
       pub finished with exit code 69
      

    备注:

    $ flutter doctor
    Doctor summary (to see all details, run flutter doctor -v):
    [✓] Flutter (Channel stable, 3.3.9, on macOS 12.6.1 21G217 darwin-x64, locale zh-Hans-CN)
    [✓] Android toolchain - develop for Android devices (Android SDK version 33.0.1)
    [✓] Xcode - develop for iOS and macOS (Xcode 14.2)
    [✓] Chrome - develop for the web
    [✓] Android Studio (version 4.2)
    [✓] VS Code (version 1.75.1)
    [✓] Proxy Configuration
    [✓] Connected device (3 available)
    [✓] HTTP Host Availability
    
    目前尚无回复
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   实用小工具   ·   3456 人在线   最高记录 6679   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 28ms · UTC 04:32 · PVG 12:32 · LAX 20:32 · JFK 23:32
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.