Comments (15)
+1 - not able to use this package at all because of this error.
from unpub.
+1 - Also seeing this error
from unpub.
Which command did you run? And paste flutter doctor log here please. @mmarazik @DanOxlade @pattobrien
from unpub.
I was running this command
$ flutter pub publish --server http://192.168.8.174:4000
(that's the IP of my local intranet server, that I published on before)
After I get the message
Do you want to publish mt_formalyze 0.0.2 (y/N)? y
Uploading ...
missing authorization header
pub finished with exit code 1
And output of flutter doctor -v is
[✓] Flutter (Channel stable, 2.8.1, on macOS 11.3.1 20E241 darwin-x64, locale en-EG)
• Flutter version 2.8.1 at /Users/may/development/flutter
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 77d935af4d (7 weeks ago), 2021-12-16 08:37:33 -0800
• Engine revision 890a5fca2e
• Dart version 2.15.1
[✓] Android toolchain - develop for Android devices (Android SDK version 30.0.3)
• Android SDK at /Users/may/Library/Android/sdk
• Platform android-32, build-tools 30.0.3
• Java binary at: /Applications/Android Studio.app/Contents/jre/Contents/Home/bin/java
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
• All Android licenses accepted.
[!] Xcode - develop for iOS and macOS (Xcode 12.5)
• Xcode at /Applications/Xcode.app/Contents/Developer
! Flutter recommends a minimum Xcode version of 13.0.0.
Download the latest version or update via the Mac App Store.
• CocoaPods version 1.10.1
[✓] Chrome - develop for the web
• Chrome at /Applications/Google Chrome.app/Contents/MacOS/Google Chrome
[✓] Android Studio (version 2020.3)
• Android Studio at /Applications/Android Studio.app/Contents
• Flutter plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/9212-flutter
• Dart plugin can be installed from:
🔨 https://plugins.jetbrains.com/plugin/6351-dart
• Java version OpenJDK Runtime Environment (build 11.0.10+0-b96-7281165)
[✓] VS Code (version 1.64.0)
• VS Code at /Applications/Visual Studio Code.app/Contents
• Flutter extension version 3.34.0
[✓] Connected device (3 available)
• Nexus 4 (mobile) • 017a92910a8da94b • android-arm • Android 5.1.1 (API 22)
• Android SDK built for x86 (mobile) • emulator-5554 • android-x86 • Android 10 (API 29) (emulator)
• Chrome (web) • chrome • web-javascript • Google Chrome 98.0.4758.80
! Doctor found issues in 1 category.
from unpub.
@mmarazik You should use unpub_auth
cli tool to adapt the new authorization since Dart 2.15. Read https://github.com/bytedance/unpub/tree/master/unpub_auth
from unpub.
Thank you for the reponse,
I tried doing that before, but it said that unpub_auth is only for https servers, my server is http, must we enable https or is there a way to work with it as http?
from unpub.
Thank you for the reponse,
I tried doing that before, but it said that unpub_auth is only for https servers, my server is http, must we enable https or is there a way to work with it as http?
Please show me the output if it said that unpub_auth is only for https servers. It doesn't look like unpub_auth output.
from unpub.
According to unpub_auth documentation
"Before calling dart pub publish or flutter pub publish, please call unpub_auth get | dart pub token add first."
so first I called
$unpub_auth login
and I logged in successfully
then when calling
$dart pub token add http://192.168.8.174:4000
Invalid [hosted-url]: "http://192.168.8.174:4000"
url must be https://, insecure repositories cannot use authentication.
Usage: pub token add
-h, --help Print this usage information.
--env-var Read the secret token from this environment variable when making requests.
Run "dart help" to see global options.
from unpub.
Invalid [hosted-url]: "http://192.168.8.174:4000"
url must be https://, insecure repositories cannot use authentication.
It's the limit of the official Dart pub command.
You should see dart-lang/pub#3286.
from unpub.
After updating Flutter to 2.10.0 and I'm able to publish now. My local unpub server is using https though.
from unpub.
Does anyone else have any questions? @pattobrien @mmarazik
from unpub.
Just to be clear so we cannot use this package with http since dart 2.15? it has to be https, is this right?
from unpub.
Just to be clear so we cannot use this package with http since dart 2.15? it has to be https, is this right?
unpub_auth is a independent auth tool for unpub. It is only adapt Dart 2.15 and later. unpub is a pub server. It's nothing to do with Dart version.
"url must be https://, insecure repositories cannot use authentication." is a prompt message from the Dart client. It seems that you should use https
in your unpub server since Dart 2.15.
from unpub.
For those who managed to run unpub on https, can you please share how did you do that?
from unpub.
For those who managed to run unpub on https, can you please share how did you do that?
@mmarazik just use ngrok
from unpub.
Related Issues (20)
- 'String?' is nullable and 'Object' isn't. HOT 7
- Failing to publish packages to local pub server with error: DetailedApiRequestError(status: 400, message: No error details. HTTP status was: 400.) HOT 4
- Failing publish new package. HTTP Error
- SocketException: Failed to create server socket (OS Error: Address already in use, errno = 48), address = 0.0.0.0, port = 4000
- errmsg: command count requires authentication? HOT 1
- Is there a way to get an unlimited token duration ? HOT 1
- 文档很简陋,看完了还是不知道怎么用
- 执行unpub --database报错This is an unexpected error HOT 1
- Download button on Versions/Archive doesn't work HOT 3
- Failed to publish package using Melos HOT 4
- Reverse proxy support does not work for subpath HOT 3
- [Question] Error: Cannot use origin without a scheme: /api/packages/versions/newUpload HOT 1
- Automatic API documentation generation HOT 2
- [Feature] Provide your own OAuth provider HOT 2
- Failed when publishing a package [Incompatible mongodb version] HOT 2
- [400] /api/packages/versions/newUploadFinish?error=HandshakeException HOT 1
- Build fails due to missing pub binary
- It looks like you are trying to access MongoDB over HTTP on the native driver port. HOT 1
- Getting 500 internal server error in /webapi/packages HOT 1
- [400 错误]上传插件报错,Bad multipart ending 是什么原因
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from unpub.