Flutter Pubspec.yaml Warning: Publishable packages can't have git dependencies
8,135
Solution 1
My guess is that it helps you preventing publishing dummy/old package by doing extra check on package that are set to be published. You should add (at the root of the document, for example after the version
field):
publish_to: none
to your pubspec.yaml
Solution 2
Adding your SSH in git account will solve your problem. visit Here to know how to generate SSH key
Comments
-
Zenko over 1 year
I'm using Sembast Cloud Firestore type adapters in my pubspec.yaml:
sembast_cloud_firestore_type_adapters: git: url: git://github.com/tekartik/sembast_flutter_more.dart path: cloud_firestore_type_adapters ref: dart2 version: '>=0.1.0'
and loading adapters:
loading: git: url: git://github.com/leonzone/loading.git path: loading ref: 8f5a63f
Everything works fine until today. I got this error for both of the above lines:
warning: Publishable packages can't have git dependencies.
Here is my
flutter doctor
:Doctor summary (to see all details, run flutter doctor -v): [✓] Flutter (Channel master, 1.24.0-7.0.pre.71, on Mac OS X 10.15.7 19H2 darwin-x64, locale en-US) [✓] Android toolchain - develop for Android devices (Android SDK version 30.0.2) [✓] Xcode - develop for iOS and macOS (Xcode 12.1) [✓] Chrome - develop for the web [✓] Android Studio (version 4.1) [✓] VS Code (version 1.50.1) [✓] Connected device (3 available) • No issues found!