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

2023-02-15 10:21:17 +08:00
 molly2mollyzyz

目前已尝试的手段有:

  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
1664 次点击
所在节点    Flutter
0 条回复

这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。

https://www.v2ex.com/t/916231

V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。

V2EX is a community of developers, designers and creative people.

© 2021 V2EX