由于“请求具有不足的认证范围",部署失败. [英] Deployment failed due to "Request had insufficient authentication scopes"
本文介绍了由于“请求具有不足的认证范围",部署失败.的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我在project1上创建了新的VM实例(jenkins服务器),并在其上安装了jenkins服务器. jenkins作业之一应构建我的应用程序,并使用以下命令
将其部署在project2上mvn gcloud:deploy -Dgcloud.gcloud_project=project2 -Dgcloud.version=jenkins-build-1
由于以下错误,命令失败:
[INFO] Beginning deployment...
[INFO] DEBUG: No bucket specified, retrieving default bucket.
[INFO] DEBUG: {u'status': u'PERMISSION_DENIED', u'message': u'Request had insufficient authentication scopes.',
u'code': 403}
[INFO] ERROR: Error Response: [403] Request had insufficient authentication scopes.
[INFO] DEBUG: Using bucket [].
[INFO] DEBUG: (gcloud.preview.app.deploy) Could not retrieve the default Google Cloud Storage bucket for [project2]. Please try again or use the [bucket] argument.
我在project2上创建了名为jenkins-server的新存储桶,并使用bucket参数再次尝试了该命令
[INFO] Beginning deployment...
[INFO] DEBUG: Using bucket [gs://jenkins-server].
[INFO] DEBUG: Host: appengine.google.com
[INFO] DEBUG: (gcloud.preview.app.deploy) Required scopes ['https://www.googleapis.com/auth/appengine.admin', 'https://www.googleapis.com/auth/cloud-platform'] missing from [list of scopes]. This VM instance probably needs to be recreated with the missing scopes
已创建具有完全权限的Project1
Google SDK版本为最新版本:Google Cloud SDK 95.0.0
[UPDATE]
在project1上,我在jenkins服务器实例上使用了预安装了jenkins的映像,但是我仅使用ubuntu 14.04 LTS重新创建了该实例,并手动安装了其他所有内容(cloud sdk,tomcat服务器,jenkins,maven ...)>
上述问题消失了,但现在我得到了不同的错误
ERROR: (gcloud.preview.app.deploy) Could not synchronize files. The gsutil command exited with status [1]
并且在检查日志文件后,我可以看到以下错误:
Building synchronization state... Caught non-retryable exception while listing file:///tmp/tmpsgDQKG: [Errno 2] No such file or directory: '/tmp/tmpsgDQKG/cc79fffba16616623f47691da45b33db1beb4209.pem'
CommandException: Caught non-retryable exception - aborting rsync
对于默认存储桶和自定义存储桶,这是相同的错误
感谢您的帮助
解决方案
根据 解决方案
As per the detail for issue 532 which was filed, the workaround was to deploy using gcloud config set app/use_gsutil false
, however this is now the default as of gcloud version 106.0.0
这篇关于由于“请求具有不足的认证范围",部署失败.的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文