Oauth 2.0 颤振包发布-未授权访问:未授权用户:。。。不允许将版本上载到包
我正试图发布一个新的颤振插件。我按照所有步骤完成了,我的代码被上传到github:所有的东西都准备好发布了 当我运行Oauth 2.0 颤振包发布-未授权访问:未授权用户:。。。不允许将版本上载到包,oauth-2.0,dart,flutter,dart-pub,Oauth 2.0,Dart,Flutter,Dart Pub,我正试图发布一个新的颤振插件。我按照所有步骤完成了,我的代码被上传到github:所有的东西都准备好发布了 当我运行flatter-packages-pub-publish时,我得到以下响应: Pub needs your authorization to upload packages on your behalf. In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&
flatter-packages-pub-publish
时,我得到以下响应:
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A35625&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
Then click "Allow access".
FINE: Pub 2.1.0-dev.9.4.flutter-f9ebf21297
FINE: Loading OAuth2 credentials.
MSG : Pub needs your authorization to upload packages on your behalf.
| In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A37441&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
| Then click "Allow access".
|
| Waiting for your authorization...
MSG : Authorization received, processing...
IO : HTTP POST https://accounts.google.com/o/oauth2/token
| content-type: application/x-www-form-urlencoded; charset=utf-8
| user-agent: Dart pub 2.1.0-dev.9.4.flutter-f9ebf21297
IO : HTTP response 200 OK for POST https://accounts.google.com/o/oauth2/token
| took 0:00:00.205821
| alt-svc: quic=":443"; ma=2592000; v="44,43,39"
| cache-control: private
| transfer-encoding: chunked
| date: Fri, 25 Jan 2019 11:03:58 GMT
| vary: Origin,X-Origin,Referer
| content-encoding: gzip
| x-frame-options: SAMEORIGIN
| content-type: application/json; charset=utf-8
| x-xss-protection: 1; mode=block
| x-content-type-options: nosniff
| server: ESF
MSG : Successfully authorized.
IO : HTTP POST https://pub.dartlang.org/api/packages/flutter_share_image/uploaders
| Accept: application/vnd.pub.v2+json
| content-type: application/x-www-form-urlencoded; charset=utf-8
| authorization: <censored>
| user-agent: Dart pub 2.1.0-dev.9.4.flutter-f9ebf21297
IO : HTTP response 403 Forbidden for POST https://pub.dartlang.org/api/packages/flutter_share_image/uploaders
| took 0:00:00.286149
| transfer-encoding: chunked
| date: Fri, 25 Jan 2019 11:03:59 GMT
| content-encoding: gzip
| vary: Accept-Encoding
| via: 1.1 google
| content-type: application/json
| x-frame-options: SAMEORIGIN
| x-xss-protection: 1; mode=block
| x-content-type-options: nosniff
| server: dart:io with Shelf
FINE: Saving OAuth2 credentials.
IO : Writing 400 characters to text file /home/nadia/.pub-cache/credentials.json.
ERR : Unauthorized request.
FINE: Exception type: ApplicationException
FINE: package:pub/src/utils.dart 571:5 fail
| package:pub/src/http.dart 302:3 handleJsonError
| package:pub/src/command/uploader.dart 78:32 UploaderCommand.run.<fn>
| dart:async _AsyncAwaitCompleter.completeError
| package:http/src/base_client.dart BaseClient._sendUnstreamed
| ===== asynchronous gap ===========================
| dart:async Future.catchError
| package:pub/src/command/uploader.dart 78:10 UploaderCommand.run
| package:args/command_runner.dart 194:27 CommandRunner.runCommand
我进入链接,通过我的google帐户进行身份验证,最终得到以下结果:
Waiting for your authorization...
Authorization received, processing...
Successfully authorized.
Uploading...
UnauthorizedAccess: Unauthorized user: nadiagnieto@gmail.com is not allowed to upload versions to package flutter_share_image..
之后,我运行以下命令:rm~/.pub cache/credentials.json
删除credentials.json和pub uploader addnadiagnieto@gmail.com--verbosity=all
授予此电子邮件的权限,但我得到以下响应:
Pub needs your authorization to upload packages on your behalf.
In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A35625&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
Then click "Allow access".
FINE: Pub 2.1.0-dev.9.4.flutter-f9ebf21297
FINE: Loading OAuth2 credentials.
MSG : Pub needs your authorization to upload packages on your behalf.
| In a web browser, go to https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2Flocalhost%3A37441&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
| Then click "Allow access".
|
| Waiting for your authorization...
MSG : Authorization received, processing...
IO : HTTP POST https://accounts.google.com/o/oauth2/token
| content-type: application/x-www-form-urlencoded; charset=utf-8
| user-agent: Dart pub 2.1.0-dev.9.4.flutter-f9ebf21297
IO : HTTP response 200 OK for POST https://accounts.google.com/o/oauth2/token
| took 0:00:00.205821
| alt-svc: quic=":443"; ma=2592000; v="44,43,39"
| cache-control: private
| transfer-encoding: chunked
| date: Fri, 25 Jan 2019 11:03:58 GMT
| vary: Origin,X-Origin,Referer
| content-encoding: gzip
| x-frame-options: SAMEORIGIN
| content-type: application/json; charset=utf-8
| x-xss-protection: 1; mode=block
| x-content-type-options: nosniff
| server: ESF
MSG : Successfully authorized.
IO : HTTP POST https://pub.dartlang.org/api/packages/flutter_share_image/uploaders
| Accept: application/vnd.pub.v2+json
| content-type: application/x-www-form-urlencoded; charset=utf-8
| authorization: <censored>
| user-agent: Dart pub 2.1.0-dev.9.4.flutter-f9ebf21297
IO : HTTP response 403 Forbidden for POST https://pub.dartlang.org/api/packages/flutter_share_image/uploaders
| took 0:00:00.286149
| transfer-encoding: chunked
| date: Fri, 25 Jan 2019 11:03:59 GMT
| content-encoding: gzip
| vary: Accept-Encoding
| via: 1.1 google
| content-type: application/json
| x-frame-options: SAMEORIGIN
| x-xss-protection: 1; mode=block
| x-content-type-options: nosniff
| server: dart:io with Shelf
FINE: Saving OAuth2 credentials.
IO : Writing 400 characters to text file /home/nadia/.pub-cache/credentials.json.
ERR : Unauthorized request.
FINE: Exception type: ApplicationException
FINE: package:pub/src/utils.dart 571:5 fail
| package:pub/src/http.dart 302:3 handleJsonError
| package:pub/src/command/uploader.dart 78:32 UploaderCommand.run.<fn>
| dart:async _AsyncAwaitCompleter.completeError
| package:http/src/base_client.dart BaseClient._sendUnstreamed
| ===== asynchronous gap ===========================
| dart:async Future.catchError
| package:pub/src/command/uploader.dart 78:10 UploaderCommand.run
| package:args/command_runner.dart 194:27 CommandRunner.runCommand
FINE:Pub 2.1.0-dev.9.4.flatter-f9ebf21297
很好:正在加载OAuth2凭据。
MSG:Pub需要您的授权才能代表您上传软件包。
|在web浏览器中,转到https://accounts.google.com/o/oauth2/auth?access_type=offline&approval_prompt=force&response_type=code&client_id=818368855108-8grd2eg9tj9f38os6f1urbcvsq399u8n.apps.googleusercontent.com&redirect_uri=http%3A%2F%2localhost%3A37441&scope=https%3A%2F%2Fwww.googleapis.com%2Fauth%2Fuserinfo.email
|然后单击“允许访问”。
|
|正在等待您的授权。。。
消息:已收到授权,正在处理。。。
IO:HTTP POSThttps://accounts.google.com/o/oauth2/token
|内容类型:application/x-www-form-urlencoded;字符集=utf-8
|用户代理:Dart pub 2.1.0-dev.9.4.flatter-f9ebf21297
IO:HTTP响应200可用于POSThttps://accounts.google.com/o/oauth2/token
|拍摄时间:0:00:00.205821
|alt svc:quic=“:443”;ma=2592000;v=“44,43,39”
|缓存控制:专用
|传输编码:分块
|日期:2019年1月25日星期五11:03:58 GMT
|变化:原点、X原点、参考
|内容编码:gzip
|x-frame-options:SAMEORIGIN
|内容类型:application/json;字符集=utf-8
|x-xss-protection:1;模式=块
|x-content-type-options:nosniff
|服务器:ESF
MSG:已成功授权。
IO:HTTP POSThttps://pub.dartlang.org/api/packages/flutter_share_image/uploaders
|接受:application/vnd.pub.v2+json
|内容类型:application/x-www-form-urlencoded;字符集=utf-8
|授权:
|用户代理:Dart pub 2.1.0-dev.9.4.flatter-f9ebf21297
IO:HTTP响应403禁止发布https://pub.dartlang.org/api/packages/flutter_share_image/uploaders
|拍摄时间:0:00:00.286149
|传输编码:分块
|日期:2019年1月25日星期五11:03:59 GMT
|内容编码:gzip
|改变:接受编码
|via:1.1谷歌
|内容类型:application/json
|x-frame-options:SAMEORIGIN
|x-xss-protection:1;模式=块
|x-content-type-options:nosniff
|服务器:带托架的dart:io
好:保存OAuth2凭据。
IO:将400个字符写入文本文件/home/nadia/.pub cache/credentials.json。
错误:未经授权的请求。
精细:异常类型:ApplicationException
罚款:包:pub/src/utils.dart 571:5失败
|包:pub/src/http.dart 302:3 handleJsonError
|包:pub/src/command/uploader.dart 78:32 UploaderCommand.run。
|dart:async\u AsyncAwaitCompleter.completeError
|包:http/src/base\u client.dart BaseClient.\u sendUnstreamed
|======异步间隙===========================
|dart:async Future.catchError
|包:pub/src/command/uploader.dart 78:10 UploaderCommand.run
|包:args/command_runner.dart 194:27 CommandRunner.runCommand
我不知道我是否做错了什么。有人知道如何上传我的软件包吗?我想发布两个新包,但我无法发布。消息表明该包已存在
如果您不是所有者,则需要选择不同的包名。已经有一个具有该名称的包,并且上载者不是Naja。你想做什么?是的,那是真的,对不起我犯了一个菜鸟的错误。。。我以前检查过包裹,但我觉得名字不一样。谢谢!