Site-www: Remove server option from pub publish page

Created on 1 Sep 2020  路  2Comments  路  Source: dart-lang/site-www

Page URL: https://dart.dev/tools/pub/cmd/pub-lish.html
Page source: https://github.com/dart-lang/site-www/tree/master/src/tools/pub/cmd/pub-lish.md

We need to remove the server discussion from this page.


Original description of issue:

The task pub publish can麓t add the option --server

beginner bug e0-minutes help wanted p2-medium tools

All 2 comments

@jonasfj can you (or someone you know :) clarify the situation with the --server option, and whether it should be mentioned in https://dart.dev/tools/pub/cmd/pub-lish and the help?

This is a problem in flutter_tool wrapping pub.

You can do it with flutter pub pub publish --server ..., but this option isn't very useful, unless you're publishing to a server behind VPN as we don't have any authentication in place for this.

Another option is to use the publish_to: <server> in pubspec.yaml. Again, then authentication story for these is not good.


I would be okay with not documenting this option on dart.dev, given that we don't have a good story with authentication for 3rd-party pub servers, I think it's reasonable that we don't document it too much.

Also there is afaik 3 ways to do this:

  • pub publish --server <url>,
  • publish_to: <url> in pubspec.yaml, and
  • export PUB_HOSTED_URL=<url> && pub publish.

Neither of these supports authentication, so users that do this typically rely on network security by being behind a VPN.

The situation is not ideal, there are issue for this: https://github.com/dart-lang/pub/issues/1381

Was this page helpful?
0 / 5 - 0 ratings

Related issues

kwalrath picture kwalrath  路  3Comments

jamesderlin picture jamesderlin  路  3Comments

dev-aentgs picture dev-aentgs  路  3Comments

kwalrath picture kwalrath  路  5Comments

tehsphinx picture tehsphinx  路  3Comments