gpt4 book ai didi

oauth-2.0 - Flutter packages pub - UnauthorizedAccess : Unauthorized user: . .. 不允许将版本上传到包

转载 作者:IT王子 更新时间:2023-10-29 06:43:15 24 4
gpt4 key购买 nike

我正在尝试发布一个新的 flutter 插件。我按照所有步骤进行了 publish my package ,我的代码上传到github:flutter_image_share一切都准备好发布了。

当我运行 flutter 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".

我转到链接,使用我的谷歌帐户进行身份验证,最后我得到了这个结果:

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 add nadiagnieto@gmail.com --verbosity= all 授予对此电子邮件的权限,但我收到此回复:

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

我不知道我做错了什么。有谁知道如何上传我的包裹?我想发布两个新包,但我做不到。

最佳答案

消息表明包已经存在。

如果您不是所有者,则需要选择不同的包名称。

关于oauth-2.0 - Flutter packages pub - UnauthorizedAccess : Unauthorized user: . .. 不允许将版本上传到包,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/54365468/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com